I have PHPWORD in /libraries/PhpOffice/PhpWord/ directory. I'm trying to use it in completly other part of app (Joomla website) like this:
require_once JPATH_LIBRARIES.'/vendor/autoload.php'; //composer
require_once JPATH_LIBRARIES.'/PhpOffice/PhpWord/PhpWord.php';
$Wzor = new \PhpOffice\PhpWord\TemplateProcessor(JPATH_ROOT.'/images/powiadomienia/SzablonPowiadomienia.docx');
But I get error:
Class 'PhpOffice\PhpWord\TemplateProcessor' not found
I tried many variants and paths, I tried to read online help but always with the same result. Can I ask for for some help and guidance? How can I include such class to my script?