-- Vladas Diržys <[email protected]> wrote
(on Tuesday, 26 May 2009, 09:40 PM +0300):
> what is the right way to get a db (or any other) resource in the controller?
> Now I'm using following line:
> $this->getFrontController()->getParam('bootstrap')->getResource('db');
> 
> Is there a better way?

Within your controller, yes, there's an easier way:

    $this->getInvokeArg('bootstrap')->getResource('db');

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/

Reply via email to