I’ve been spending a bit of time on StackOverflow lately and have even earned myself a bronze “Zend Framework” badge.

One thing I continually see in questions surrounding the bootstrap process and resource plugins is this…

protected function _initSomething()
{
    $front = FrontController::getInstance();
 
    // and so on

This is not the right way to fetch the Front Controller. For starters, at this stage it may not have been bootstrapped, meaning options supplied via configuration may not have been applied.

Following the Zend Application – Theory of Operation – Dependency Tracking documentation, this is the correct method…

protected function _initSomething()
{
    $this->bootstrap('FrontController');
    $front = this->getResource('FrontController');
 
    // and so on

The same logic applies to any required resource; Bootstrap it first then fetch it from the application container. Simple.