-- Mauricio Cuenca <[EMAIL PROTECTED]> wrote
(on Thursday, 07 February 2008, 05:20 AM -0800):
> I have this my bootstrap file:
>
> require_once 'Zend/Controller/Front.php';
> Zend_Controller_Front::run('/var/www/mauricio/application/controllers');
> Zend_Controller_Front::setParam('noViewRenderer', true);
>
> And I get the following error:
>
> Fatal error: Using $this when not in object context in
> /var/www/library/Zend/Controller/Front.php on line 634
The *only* static methods in Zend_Controller_Front are run() and
getInstance() -- so that second call is failing... and, besides which,
is too late to affect the dispatch process.
Try this instead:
$front = Zend_Controller_Front::getInstance();
$front->setParam('noViewRenderer', true)
->setControllerDirectory('/var/www/mauricio/application/controllers')
->dispatch();
> Shaun Rowe-2 wrote:
> >
> > Mauricio Cuenca wrote:
> >> Hello,
> >>
> >> What do I have to do to not require those files and keep using my
> >> Zend_View
> >> templates?
> >>
> >> Thanks!
> >
> > If you are using the ViewRenderer (default behaviour), in your action
> > method add this line of code.
> >
> > $this->_helper->viewRenderer->setNoRender();
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/