On Sun, Oct 11, 2009 at 5:02 AM, Pádraic Brady <[email protected]>wrote:
>
> You can initialise the Zend_Log instance from a method on the bootstrap
> called _initLog(), and return it from that method (essential). Then all you
> need to do from any action to get the object is
> $this->getInvokeArg('bootstrap')->getResource('Log'). If you need it in a
> Model, it depends how the Model works, where it is instantiated, etc. But
> generally you want to inject the Log into the Model through its constructor
> or a setter (assuming it's the same object you need!).
>
> Paddy
>
After sitting through the Dependency Injection Roundtable at ZendCon, I
completely agree.
- pw