Extend Zend_View to provide often used helper methods -- issue

View: New views
3 Messages — Rating Filter:   Alert me  

Extend Zend_View to provide often used helper methods -- issue

by Raavi Raaj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

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

by keith Pope-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

try passing $this

2009/3/9 Raavi Raaj <raaviraaj77@...>:

> 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]
----------------------------------------------------------------------

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

by Raavi Raaj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks a lot. That did the trick.

-R




On Mon, Mar 9, 2009 at 1:42 PM, keith Pope <mute.pop3@...> wrote:
try passing $this

2009/3/9 Raavi Raaj <raaviraaj77@...>:
> 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]
----------------------------------------------------------------------