2009年10月4日星期日

Re: [fw-mvc] Plugin by name 'Dojo' was not found in the registry when there is *no* Dojo elements in view !

-- Bourth <g.briard@cg33.fr> wrote
(on Friday, 02 October 2009, 01:04 AM -0700):
> I solved this error.
>
> In bootstrap.php
>
> I replace :
>
> $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
>
> By :
>
> $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper(
> 'ViewRenderer'
> );
>
> Could you explain me why it works now ???

The first instantiates the view renderer, but does not attach it to the
helper broker. The second grabs if from the helper broker, optionally
instantiating it if it does not exist.

--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: