Either way works, but I like your version because I personally believe singletons are evil :)
Just don't forget to bootstrap the front controller before accessing the resource, otherwise it will return null. -- *Hector Virgen* Sr. Web Developer http://www.virgentech.com On Fri, Nov 5, 2010 at 8:05 AM, Jurian Sluiman <subscr...@juriansluiman.nl>wrote: > Hi all, > > On Friday 05 Nov 2010 14:41:59 Hector Virgen wrote: > > $bootstrap = $application->getBootstrap(); > > Zend_Controller_Front::getInstance()->setParam('bootstrap', $bootstrap); > > While most tutorials use the Singleton pattern of the frontController, I > see > myself using the bootstrap more often: > > $fc = $bootstrap->getResource('frontController')->setParam('bootstrap', > $bootstrap); > > I'm not sure why I'm used to this method, but is there a preferable method? > The same counts for Zend_Registry: I prefer to get the > cache/log/navigation/etc from bootstrap than set them into the registry. > > Regards, Jurian > -- > Jurian Sluiman > Soflomo - http://soflomo.com >