문제

Okay, so this has proven to be more difficult than I expected and think it should be.

All I want to do is utilize the GData library for some youtube functionality in my site. However, I can't seem to figure out how to add everything in so Zend recognizes the classes.

I've downloaded the latest ZendGdata archive, and added the contents of \library into \vendor\Zend. Next step is to autoload all that into my application right? I've tried searching for how to do it, but nothing has helped. Now I look to you, stackoverflow. Please help me figure this madness out.

도움이 되었습니까?

해결책

How about ditching manually installing vendors and using composer which will manage all the autoloading stuff for you?

Download composer.phar into your project's root directory and run init to create a basic configuration:

curl -s https://getcomposer.org/installer | php
php composer.phar init

Follow the prompts, when it comes to searching for required packages, select zendframework/zendgdata and use the version dev-master. (If you decided to use composer for all your dependencies which I recommend, you could also at this point add zendframework/zendframework: 2.*).

Once you've done that a composer.json file will have been created. Next install your dependencies:

php composer.phar install

Once that's all done, there should be a vendor/autoload.php file that you require from your entrypoint to have autoloading of your composer dependencies working.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top