Hi,
is that best way to access resources like db, config, navigation, router,
translate from controller like that?
$this->getInvokeArg('bootstrap')->getResource('myResource');
Thanks.
On Thu, May 7, 2009 at 6:28 PM, Sergio Rinaudo <[email protected]>wrote:
> Or also like this
>
> $bootstrap = $this->getInvokeArg('bootstrap');
> $resource = $bootstrap->getResource('myResource');
>
> Sergio Rinaudo
>
> ------------------------------
> Date: Thu, 7 May 2009 17:23:42 +0200
> From: [email protected]
> To: [email protected]
> Subject: Re: [fw-general] Get Resources (DB) from Controllers
>
>
> Sorry, i make a mistake, i forget the "t" in "bootstrap" :
>
> $this->getFrontController()->getParam('boo*t*strap')->getResource('HereTheResourceYouNeed')
>
>
>
> Pierrick Boulière a écrit :
>
> In your controller (or controller action), you can get the resource you
> need by :
>
> $this->getFrontController()->getParam('boostrap')->getResource('HereTheResourceYouNeed')
>
>
> example :
> $this->getFrontController()->getParam('boostrap')->getResource('db')
>
> iceangel89 a écrit :
>
> how can i access resources like the default db adapter from my controllers?
>
>
>
>
> ------------------------------
> Chiamate gratis da PC a PC? Provale da
> Messenger!<http://messenger.it/videoconversazioni.aspx>
>
--
Elvin Şiriyev
http://elvin.siriyev.net