Where’s my Front Controller?
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.


November 28th, 2011 at 11:06 am
Hi there,
I was trying to reach you through e-mail, but I couldn’t find it.
I would like to know if you are available to work virtually in a project using Zend Framewok & MySQL.
Please, if so, send me an e-mail.