views:

117

answers:

1

The plugin declared in my application.ini file is not being triggered. I can install plugins the old way via the Bootstrap file, but I'd prefer to keep it in the INI. It doesn't ever load that file, no exception thrown, nothing.

I've tried adding .class to the declaration, but nothing.

application.ini

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
phpSettings.date.timezone = "America/Chicago"

includePaths.library = APPLICATION_PATH "/../library:/Users/shane/Sites/doctrine1/lib"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
;resources.modules = ""

resources.frontcontroller.defaultmodule = default
resources.frontcontroller.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.params.displayExceptions = 1
resources.doctrine.connections.default.dsn = "mysql://root:[email protected]/newfb"
resources.doctrine.manager.attributes.attr_model_loading = "model_loading_zend"
;resources.doctrine.manager.attributes.attr_use_native_enum = true
pluginpaths.ZFDoctrine_Application_Resource = "ZFDoctrine/Application/Resource"
autoloadernamespaces.0 = "Doctrine"
autoloadernamespaces.1 = "ZFDoctrine"
autoloadernamespaces.2 = "dummy"
autoloadernamespaces.3 = "ZFDebug"

resources.frontController.params.prefixDefaultModule = false

;; This should work, but it doesn't, not sure why
resources.frontController.plugins.messages = "dummy_Plugins_Messages"

library/dummy/Plugins/Messages.php

<?php

class dummy_Plugins_Messages extends Zend_Controller_Plugin_Abstract
{
public function  preDispatch(Zend_Controller_Request_Abstract $request) {
    parent::preDispatch($request);

    throw new Exception('HERE');

}

}

The index.php is the standard Zend_Application created using the Zend_Tool

+1  A: 

Have you registered the 'Faxxbachs_Plugins' namespace as a plugin path?

pluginpaths.Faxxbachs_Plugins = /path/to/Faxxbachs/Plugins

Also FYI, I noticed in your example, you were inconsistent in your casing of frontController. ZF tends gets whiny about case, so make sure you're consistent.

Bryan M.
You are right on both accounts. After I fixed the case from `frontcontroller` to `frontController` and added the `pluginpaths` it started to work like a charm. THANK YOU!
nvoyageur