I'm working with an application in CakePHP 2.5.4 and trying to integrate a third party library to work with a video service. The library is here: https://github.com/vzaar/vzaar-api-php
I've copied the above library to app/Vendor/vzaar/
In one of my applications controllers, app/Controller/VideosController.php, I'm including it using:
require_once APP . DS . 'Vendor' . DS . 'vzaar' . DS . 'Vzaar.php';
Whenever I run any of it's functions I get a PHP Fatal error:
Error: Cannot redeclare class User
The library has classes such as User.php and Video.php. My application also has classes with these names.
So is the solution to rename them in the library? Or have I imported/used this in the wrong way? Renaming things seems a very convoluted way around this, although I understand the issue is the same class name can't be used in multiple places.
I've searched on here and Google for a solution but haven't found anything. I would imagine this is a fairly common issue since it's likely any OOP-PHP classes from third parties might share the same names as class names in a Cake application?
Any help would be appreciated.