Search code examples
zend-frameworkzend-controller-plugin

Zend stack order of plugins assistance


I have several plugins, and I'm trying to figure out the order they should be applied in. Here they are:

  • Acl and Authentication
  • Custom ErrorHandler to use an errocontroller within a module
  • Internationalization plugin
  • View setup
  • Area Setup (sets the area (frontend, backend, or install) so i can access it and use it for logic assistance throughout my application)
  • Maintenance plugin (just reroutes the request to a maintenance page)

In what order would you put these?


Solution

  • Split it into responsibilities ...

    Required to run:

    • view setup

    System behaviour:

    • error reporting
    • i18n

    Application behaviour:

    • acl

    Nice to have:

    • area setup (not sure what this is)
    • maintenance redirect