I’ve been looking at various sites for Zend Framework best practices and information, and understand you can register plugins in two different ways:
Application.ini
resources.frontController.plugins.PluginName = "App_Controller_Plugin_PluginName"
and…
Bootstrap.php
$frontController->registerPlugin(new My_Controller_Plugin_ModuleLayout());
My question is, which is the best/preferred method and why?
My personal opinion is that doing it in bootstrap is a tad better. One example scenario is if you have a configurable plugin – you can call the constructor with some options of choice (which may be objects – with application.ini you won’t be able to do that).
But as I stated, it’s only my preference, I too would like to know if there are any best practices, so +1 for the question 🙂