Hello,
The methods addTemplate and addTemplateVariable doesn't exist in phpdocx 5, only in phpdocx 3 and previous versions. With phpdocx 5 you need to use the CreateDocxFromTemplate class to open the DOCX template and then use addTable (http://www.phpdocx.com/api-documentation/word-content/add-table-Word-document-with-PHP) to add a new table at the end of the document or replaceVariableByWordFragment (http://www.phpdocx.com/api-documentation/templates/replace-variable-word-fragment-Word-document) to replace a placeholder by a table.
Regards.