Thanks.
So, I have to extend Zend_Application_Resource_View in My_Application_Resources_View and override the getView() to instanciate My_View.
Hope I got that right :)
-R
On 7/22/09, Sebastian Krebs <SeKrebs@zedat.fu-berlin.de> wrote:
Hi
There is already a resource "view" and thats the problem: The navigation
resource tries to access it, but you overwrite it with your method.
I would advise, that you create a view resource extending the original
one. There you overwrite getView(). Look at that method, then you should
know, what to do.
Bye,
Sebastian
Raavi Raaj schrieb:
> Hi,
>
> I have extended Zend_View in My_View (as discussed here
> http://framework.zend.com/manual/en/performance.view.html#performance.view.pluginloader.extend)
>
> 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
>
--
Sebastian Krebs
http://www.kingcrunch2000.de
PGP key http://kingcrunch2000.de/public/0x44291B2B-pub.asc
没有评论:
发表评论