Question

I'm using Zend Framework 2 in a project with that code:

require_once APPPATH . "third_party/Zend/Loader/StandardAutoloader.php";

 $loader = new StandardAutoloader(array('autoregister_zf' => true));
 $loader->register();

How can I add ZendSearch from this github repo: https://github.com/zendframework/ZendSearch

I dont know how to copy it into the zend directory, so that the autoloader finds it.

Please help me.

Était-ce utile?

La solution

Ladys and gentlemen, here is the solution:

$loader = new StandardAutoloader(array('autoregister_zf' => true));
$loader->registerNamespace('ZendPdf', APPPATH . "third_party/ZendPdf");
$loader->registerNamespace('ZendSearch', APPPATH . "third_party/ZendSearch");
$loader->register();

Life could be so easy ;)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top