On Thu, Jun 11, 2009 at 4:40 AM, Jurian Sluiman
<[email protected]>wrote:

> Op Thursday 11 June 2009 02:23:08 schreef Michael Depetrillo:
> > I figured it out.
> >
> > $front = Zend_Controller_Front::getInstance();
> > $db = $front->getParam('bootstrap')->getResource('db');
> >
> > Michael DePetrillo
> > [email protected]
> > Mobile: (858) 761-1605
> > www.michaeldepetrillo.com
> >
> > On Wed, Jun 10, 2009 at 5:13 PM, Michael Depetrillo <[email protected]
> >wrote:
> > > What is the best way to access bootstrap object from a controller
> plugin?
> > >
>
>
> Or even more simple:
> $this->getInvokeArg('bootstrap')->getResource('myResource');
>
>
> In case of the db, you could better use the
> Zend_Db_Table::getDefaultAdapter() method and in some cases for resources
> it's much easier to load them into the (global!) Zend_Registry :)
>


Which brings me to a general question. What are the relative merits of doing
$this->getInvokeArg('bootstrap')->getResource('myResource') versus storing
things in good old Zend_Registry?


-- 
David Mintz
http://davidmintz.org/

The subtle source is clear and bright
The tributary streams flow through the darkness

Reply via email to