I would suggest avoiding static calls in favor of dependency injection. If
your model, mapper, or service layer depends on something from your
bootstrap, your controller can easily inject it:

$db = $this->getInvokeArg('bootstrap')->getResource('db');
$mapper = new MyMapper($db);

If your object needs configuration options, I suggest building a bootstrap
resource for it.

--
Hector


On Tue, Mar 23, 2010 at 11:44 AM, Joseph Crawford
<[email protected]>wrote:

>
> We were thinking of using this method so that we could get at our
> configuration and other bootstrap resources from anywhere for instance.
>
> $config = Bootstrap::getInstance()->getOptions();
> --
> View this message in context:
> http://n4.nabble.com/Static-Method-in-Bootstrap-File-tp1679460p1679511.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>

Reply via email to