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.

有帮助吗?

解决方案

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 ;)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top