Not sure what I did but for some reason I can't get models or plugins to load
via the application.ini file. For instance, this line:
resources.frontController.plugins[] = "Authentication_Plugin_Acl"
refuses to load the plugin located at
application/modules/authentication/plugins/Acl.php. It gives me this error
when it's enabled: Fatal error: Class 'Authentication_Plugin_Acl' not found
in
/Applications/MAMP/zendframework/library/Zend/Application/Resource/Frontcontroller.php
Same thing happens with trying to load something in a services directory.
Models don't seem to be loading either as they give a similar error.
I have to do something like this in Application/Bootstrap.php to get it to
work.
protected function _initAutoload()
{
$mLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Authentication',
'basePath' => APPLICATION_PATH . '/modules/authentication',
));
$frontController = Zend_Controller_Front::getInstance();
$frontController->registerPlugin(new
Authentication_Plugin_Acl());
}
I'm figuring I've hoaked up something in my config but I be darn if I can
find it.. Here's my application.ini file.
[production]
; --------------------------
; PHP Specific Configuration
; --------------------------
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
; ----------------------------------------
; Zend Framework Application Configuration
; ----------------------------------------
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace= "Application"
;autoloaderNamespaces[] = ""
; ------------------------------
; Front Controller Configuration
; ------------------------------
resources.frontController.controllerDirectory = APPLICATION_PATH
"/controllers"
resources.frontController.params.displayExceptions = 0
resources.frontController.defaultModule = "default"
resources.frontController.params.prefixDefaultModule = 0
;resources.frontController.plugins[] = "Authentication_Plugin_Acl"
resources.modules[] = ""
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
;
------------------------------------------------------------------------------
; Action Helpers
;
------------------------------------------------------------------------------
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.layout.layout = "default"
;
------------------------------------------------------------------------------
; View Helpers
;
------------------------------------------------------------------------------
resources.view[] =
resources.view.helperPath.Default_View_Helper = APPLICATION_PATH
"/modules/default/views/helpers"
resources.view.helperPath.Zend_View_Helper = APPLICATION_PATH
"/views/helpers"
resources.view.helperPath.ZendX_JQuery_View_Helper = APPLICATION_PATH
"/../library/ZendX/JQuery/View/Helper"
;
------------------------------------------------------------------------------
; Database Configuration
;
------------------------------------------------------------------------------
Any ideas? Something out of order maybe? Thanks in advance.
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Autoloading-models-plugins-via-ini-tp3731707p3731707.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]