Extend Zend_View to provide often used helper methods -- issue

3 messages Options
Embed this post
Permalink
Raavi Raaj

Extend Zend_View to provide often used helper methods -- issue

Reply Threaded More More options
Print post
Permalink
Hi,


But it throws this fatal error...
Notice: Undefined variable: view in C:\... \library\My\View.php on line 22
Catchable fatal error: Argument 1 passed to Zend_View_Helper_Abstract::setView() must implement interface Zend_View_Interface, null given, called in C:\...\library\My\View.php on line 22 and defined in C:\...\library\Zend\View\Helper\Abstract.php on line 50

On line 22 I have...
$this->_localHelperObjects['url']->setView($view);

I have basically copy/pasted the code from the guide.
Also, when I comment out line 22, no errors are thrown. But I don't know if I'm actually having performance benefits by commenting out line 22.

All help is appreciated.

-R
keith Pope-4

Re: Extend Zend_View to provide often used helper methods -- issue

Reply Threaded More More options
Print post
Permalink
try passing $this

2009/3/9 Raavi Raaj <[hidden email]>:

> Hi,
> I was following the performance guide
> at http://framework.zend.com/manual/en/performance.view.html#performance.view.pluginloader.extend
> But it throws this fatal error...
> Notice: Undefined variable: view in C:\... \library\My\View.php on line 22
> Catchable fatal error: Argument 1 passed to
> Zend_View_Helper_Abstract::setView() must implement interface
> Zend_View_Interface, null given, called in C:\...\library\My\View.php on
> line 22 and defined in C:\...\library\Zend\View\Helper\Abstract.php on line
> 50
> On line 22 I have...
> $this->_localHelperObjects['url']->setView($view);
> I have basically copy/pasted the code from the guide.
> Also, when I comment out line 22, no errors are thrown. But I don't know if
> I'm actually having performance benefits by commenting out line 22.
> All help is appreciated.
> -R



--
----------------------------------------------------------------------
[MuTe]
----------------------------------------------------------------------
Raavi Raaj

Re: Extend Zend_View to provide often used helper methods -- issue

Reply Threaded More More options
Print post
Permalink
Thanks a lot. That did the trick.

-R




On Mon, Mar 9, 2009 at 1:42 PM, keith Pope <[hidden email]> wrote:
try passing $this

2009/3/9 Raavi Raaj <[hidden email]>:
> Hi,
> I was following the performance guide
> at http://framework.zend.com/manual/en/performance.view.html#performance.view.pluginloader.extend
> But it throws this fatal error...
> Notice: Undefined variable: view in C:\... \library\My\View.php on line 22
> Catchable fatal error: Argument 1 passed to
> Zend_View_Helper_Abstract::setView() must implement interface
> Zend_View_Interface, null given, called in C:\...\library\My\View.php on
> line 22 and defined in C:\...\library\Zend\View\Helper\Abstract.php on line
> 50
> On line 22 I have...
> $this->_localHelperObjects['url']->setView($view);
> I have basically copy/pasted the code from the guide.
> Also, when I comment out line 22, no errors are thrown. But I don't know if
> I'm actually having performance benefits by commenting out line 22.
> All help is appreciated.
> -R



--
----------------------------------------------------------------------
[MuTe]
----------------------------------------------------------------------