Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Zend GData in a Symfony2 project

I'm working on a project based on Symfony2 framework, and I would like to be able to search for Youtube videos and display them. For that, I've been trying to figure out a way to load Zend GData classes into my Symfony2 controller, but there's very little or no documentation about this topic. So I would like to know if there's a way of doing this.

Thanks in advance.

like image 321
lgomezma Avatar asked Dec 22 '22 13:12

lgomezma


1 Answers

  1. add this line to the namespaces array of your autoload.php file:

    'Zend' => DIR.'/../vendor/Zend/library',

  2. use the classes just as you would do in a zend app:

    $gdata = new \Zend\GData\GData();

It might be useful to register and use some classes as services, but that's another topic...

like image 135
stoefln Avatar answered Dec 26 '22 16:12

stoefln