Zend Framework: Autoloading module resources in config.ini?
Posted
by Olagato
on Stack Overflow
See other posts from Stack Overflow
or by Olagato
Published on 2010-03-13T18:58:37Z
Indexed on
2010/03/13
19:05 UTC
Read the original article
Hit count: 336
zend-framework
|configuration
|configuration-files
|bootstrapping
|zend-application
Is it possible, to configure the following behaviour in application.ini?
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAdminModuleAutoloader()
{
$this->_resourceLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Admin',
'basePath' => APPLICATION_PATH . '/modules/admin',
));
$this->_resourceLoader->addResourceTypes(array(
'model' => array(
'namespace' => 'Model',
'path' => 'models'
)
));
}
}
?>
If so, can you please show us an example?
Thanks.
© Stack Overflow or respective owner