I've already tried imporStyles method too. But when I try to apply one of my custom style, I felt of that weird error (see below):
ContextErrorException: Warning: DOMDocument::loadXML(): xmlParseEntityRef: no name in Entity, line: 6694 in PHPDOCX\classes\CreateDocx.inc line 983
I've googlised the error, and I found on stackoverflow that explanation : http://stackoverflow.com/questions/7604436/xmlparseentityref-no-name-warnings-while-loading-xml-into-a-php-file . I tried to search a & symbol in my template and in my text that I passed in the addText method . But no & symbol found.