2009年7月21日星期二

[fw-mvc] My_View and bootstrapping

Hi,
 
 
I want now use My_View, so in my bootstarp I have...

protected function _initView()
    {
        // Setup View
        $view = new My_View;

        // Set view in ViewRenderer
        $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
        $viewRenderer->setView($view);
        Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
        ...
        return $view;
    }

The above works file with Zend_Navigation disabled. But when I enable Zend_Navigation, I get the following error..
Fatal error: Call to a member function getView() on a non-object in C:\...\library\Zend\Application\Resource\Navigation.php on line 99

Do I have to create an Application resource "View" or is there something I am doing wrong.

Kindly advice.

regards,

-R

没有评论: