I need to add the quite excellent PHPWord - https://github.com/PHPOffice/PHPWord to a Joomla 2.5 project.
I have added the PHPWord files to the plugins folder (might not be the correct choice) and have the following code
$phpWord = new \libraries\PhpOffice\PhpWord\PhpWord();
The class is not found as it is not autoloading. How would I load these classes in Joomla and it there a better folder than plugins that will will autoload?
I have added these lines
JLoader::discover('PhpWord', JPATH_LIBRARIES . '/PhpOffice/PhpWord/');
$phpWord = new PhpWord;
Inside the PhpWord folder is Phpword.php and autoloader.php, as well as several other scripts.