开发者

zend_loader_autoloader does not seem to load abstract class

开发者 https://www.devze.com 2023-02-28 06:46 出处:网络
I am getting a grip on Zend_Autoload but a non-zend class I have is not loading when extended. The autoloader is initialized like so:

I am getting a grip on Zend_Autoload but a non-zend class I have is not loading when extended.

The autoloader is initialized like so:

 // Initialise Autoloader
 $autoloader = Zend_Loader_Autoloader::getInstance();
 $autoloader->开发者_StackOverflow社区suppressNotFoundWarnings(true);
 $autoloader->setFallbackAutoloader(true);
 $autoloader->registerNamespace('lib_');
 }

It all works fine with other classes. Is it required to load abstract class files and implemented interfaces manually beforehand?


Zend_loader_autoloader actually does load abstract classes, idem for any interface a class may implement. Sweet.

A couple of debugging calls straight in the Zend_Loader class quickly indicated my problem: My file was named AbstractTableFetch.php , the class was called FetchTable.

The autoloader obviously will only works if the filename and class name are the same.

0

精彩评论

暂无评论...
验证码 换一张
取 消