keith Pope wrote:
MyAutoloader is:2009/4/9 Matthew Weier O'Phinney <matthew@zend.com>:-- keith Pope <mute.pop3@googlemail.com> wrote (on Wednesday, 08 April 2009, 10:17 PM +0100):The module resource skips the default module, you need to set that one up yourself, I think :)Your default module should be the one whose bootstrap you are attaching to Zend_Application typically.Indeed that makes more sense :) I look forward to your example hopefully I have got it mostly correct :)
//set Autoloader
protected function _initAutoloader()
{
$this->_logger->info('Bootstrap ' . __METHOD__);
$this->bootstrap('frontcontroller');
$this->bootstrap('logging');
$this->_modules = array('admin' => MODULE_PATH . '/admin', 'default' => MODULE_PATH . '/default');
foreach ($this->_modules as $namespace => $path) {
$loader = new Zend_Application_Module_Autoloader(array(
'namespace' => $namespace,
'basePath' => $path,
));
}
return $this;
}
But i still got that error...
Fatal error: Class 'Admin_Model_Acl' not found in D:\_Work\yda\application\Bootstrap.php on line 163
If i change this line
$this->_modules = array('Admin' => MODULE_PATH . '/admin', 'Default' => MODULE_PATH . '/default');
I got this...
Fatal error: Uncaught exception 'Zend_Controller_Exception' with message 'No default module defined for this application'
Confusing...
-- Best regards, Cristian Bichis www.zftutorials.com | www.zfforums.com | www.zftalk.com | www.zflinks.com
没有评论:
发表评论