<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Zend Framework Custom View Helper</title>
	<atom:link href="http://inchoo.net/zend/zend-framework-custom-view-helper/feed/" rel="self" type="application/rss+xml" />
	<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/</link>
	<description>Magento Design and Magento Development Professionals - Inchoo</description>
	<lastBuildDate>Thu, 09 Feb 2012 23:51:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Adeel</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-22777</link>
		<dc:creator>Adeel</dc:creator>
		<pubDate>Wed, 21 Sep 2011 14:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-22777</guid>
		<description>Thank you for this post. Very simple and to the point and really helped me get over a problem I was encountering while developing one View Helper :)</description>
		<content:encoded><![CDATA[<p>Thank you for this post. Very simple and to the point and really helped me get over a problem I was encountering while developing one View Helper <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph John</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-22453</link>
		<dc:creator>Joseph John</dc:creator>
		<pubDate>Thu, 25 Aug 2011 11:19:27 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-22453</guid>
		<description>Hi, Iam also getting the above type error, also I written the code for extends the abstract class

This is my error , please help us.

Fatal error: Uncaught exception &#039;Zend_Loader_PluginLoader_Exception&#039; with message &#039;Plugin by name &#039;GetMenus&#039; was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/;C:\xampp\htdocs\directions\application/views/helpers/;C:/xampp/htdocs/directions/application/views\helpers/&#039; in C:\xampp\php\PEAR\Zend\Loader\PluginLoader.php:412 Stack trace: #0 C:\xampp\php\PEAR\Zend\View\Abstract.php(1182): Zend_Loader_PluginLoader-&gt;load(&#039;GetMenus&#039;) #1 C:\xampp\php\PEAR\Zend\View\Abstract.php(618): Zend_View_Abstract-&gt;_getPlugin(&#039;helper&#039;, &#039;getMenus&#039;) #2 C:\xampp\php\PEAR\Zend\View\Abstract.php(344): Zend_View_Abstract-&gt;getHelper(&#039;getMenus&#039;) #3 [internal function]: Zend_View_Abstract-&gt;__call(&#039;getMenus&#039;, Array) #4 C:\xampp\htdocs\directions\application\layouts\scripts\sidebar.phtml(1): Zend_View-&gt;getMenus() #5 C:\xampp\php\PEAR\Zend\View.php(108): include(&#039;C:\xampp\htdocs...&#039;) #6 C:\xampp\php\PEAR\Zend\View\Abstract.php(888): Zend_View-&gt;_run(&#039;C:\xampp\htdocs...&#039;) #7 C:\xampp\php\PEAR\Zend\View\Helper\Partial.php(105): in C:\xampp\php\PEAR\Zend\Controller\Plugin\Broker.php on line 336</description>
		<content:encoded><![CDATA[<p>Hi, Iam also getting the above type error, also I written the code for extends the abstract class</p>
<p>This is my error , please help us.</p>
<p>Fatal error: Uncaught exception &#8216;Zend_Loader_PluginLoader_Exception&#8217; with message &#8216;Plugin by name &#8216;GetMenus&#8217; was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/;C:\xampp\htdocs\directions\application/views/helpers/;C:/xampp/htdocs/directions/application/views\helpers/&#8217; in C:\xampp\php\PEAR\Zend\Loader\PluginLoader.php:412 Stack trace: #0 C:\xampp\php\PEAR\Zend\View\Abstract.php(1182): Zend_Loader_PluginLoader-&gt;load(&#8216;GetMenus&#8217;) #1 C:\xampp\php\PEAR\Zend\View\Abstract.php(618): Zend_View_Abstract-&gt;_getPlugin(&#8216;helper&#8217;, &#8216;getMenus&#8217;) #2 C:\xampp\php\PEAR\Zend\View\Abstract.php(344): Zend_View_Abstract-&gt;getHelper(&#8216;getMenus&#8217;) #3 [internal function]: Zend_View_Abstract-&gt;__call(&#8216;getMenus&#8217;, Array) #4 C:\xampp\htdocs\directions\application\layouts\scripts\sidebar.phtml(1): Zend_View-&gt;getMenus() #5 C:\xampp\php\PEAR\Zend\View.php(108): include(&#8216;C:\xampp\htdocs&#8230;&#8217;) #6 C:\xampp\php\PEAR\Zend\View\Abstract.php(888): Zend_View-&gt;_run(&#8216;C:\xampp\htdocs&#8230;&#8217;) #7 C:\xampp\php\PEAR\Zend\View\Helper\Partial.php(105): in C:\xampp\php\PEAR\Zend\Controller\Plugin\Broker.php on line 336</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: takpar</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-22338</link>
		<dc:creator>takpar</dc:creator>
		<pubDate>Tue, 16 Aug 2011 09:27:57 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-22338</guid>
		<description>You missed this: 
class Zend_View_Helper_State extends Zend_View_Helper_Abstract</description>
		<content:encoded><![CDATA[<p>You missed this:<br />
class Zend_View_Helper_State extends Zend_View_Helper_Abstract</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Cobby</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-15884</link>
		<dc:creator>Andrew Cobby</dc:creator>
		<pubDate>Fri, 07 Jan 2011 00:54:02 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-15884</guid>
		<description>@Ladislav

Please review your conceptual understanding of the MVC design pattern.

I guess you think it&#039;s like this:

Model --&gt; Controller --&gt; View

But they actually form a triangle, please see Martin Fowler&#039;s reference: http://martinfowler.com/eaaCatalog/modelViewController.html

View helpers are part of the view layer so it&#039;s fine for them to access repository objects in your domain layer.</description>
		<content:encoded><![CDATA[<p>@Ladislav</p>
<p>Please review your conceptual understanding of the MVC design pattern.</p>
<p>I guess you think it&#8217;s like this:</p>
<p>Model &#8211;&gt; Controller &#8211;&gt; View</p>
<p>But they actually form a triangle, please see Martin Fowler&#8217;s reference: <a href="http://martinfowler.com/eaaCatalog/modelViewController.html" rel="nofollow">http://martinfowler.com/eaaCatalog/modelViewController.html</a></p>
<p>View helpers are part of the view layer so it&#8217;s fine for them to access repository objects in your domain layer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abs</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-8671</link>
		<dc:creator>abs</dc:creator>
		<pubDate>Thu, 14 Oct 2010 18:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-8671</guid>
		<description>This may solve simple problems but it is not following the MVC pattern and will be a mess if this method is used in larger projects.</description>
		<content:encoded><![CDATA[<p>This may solve simple problems but it is not following the MVC pattern and will be a mess if this method is used in larger projects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davide Gullo</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-8576</link>
		<dc:creator>Davide Gullo</dc:creator>
		<pubDate>Thu, 07 Oct 2010 13:59:21 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-8576</guid>
		<description>I got an error very strange.
My view helpers have no problem in the views scripts but I cannot call them from my layout scripts.
Look at my stack:

Fatal error: Uncaught exception &#039;Zend_Loader_PluginLoader_Exception&#039; with message &#039;Plugin by name &#039;IsLogged&#039; was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/&#039; in /usr/local/zend/share/ZendFramework/library/Zend/Loader/PluginLoader.php:412 Stack trace: 
#0 /usr/local/zend/share/ZendFramework/library/Zend/View/Abstract.php(1174): Zend_Loader_PluginLoader-&gt;load(&#039;IsLogged&#039;) 
#1 /usr/local/zend/share/ZendFramework/library/Zend/View/Abstract.php(610): Zend_View_Abstract-&gt;_getPlugin(&#039;helper&#039;, &#039;isLogged&#039;) 
#2 /usr/local/zend/share/ZendFramework/library/Zend/View/Abstract.php(336): Zend_View_Abstract-&gt;getHelper(&#039;isLogged&#039;) 
#3 /Users/gullo/Sites/myproject/application/views/scripts/header.phtml(3): Zend_View_Abstract-&gt;__call(&#039;isLogged&#039;, Array) 
#4 /Users/gullo/Sites/myproject/application/views/scripts/header.phtml(3): Zend_View-&gt;isLogged() 
#5 /usr/local/zend/share/ZendFramework/library/Zend/View.php(108): include(&#039;/Users/gullo/Si...&#039;) 
#6 /usr/local/zend/share/ZendFramework/library/Zend/View/Abstract.php(880) in /usr/local/zend/share/ZendFramework/library/Zend/Loader/PluginLoader.php on line 412</description>
		<content:encoded><![CDATA[<p>I got an error very strange.<br />
My view helpers have no problem in the views scripts but I cannot call them from my layout scripts.<br />
Look at my stack:</p>
<p>Fatal error: Uncaught exception &#8216;Zend_Loader_PluginLoader_Exception&#8217; with message &#8216;Plugin by name &#8216;IsLogged&#8217; was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/&#8217; in /usr/local/zend/share/ZendFramework/library/Zend/Loader/PluginLoader.php:412 Stack trace:<br />
#0 /usr/local/zend/share/ZendFramework/library/Zend/View/Abstract.php(1174): Zend_Loader_PluginLoader-&gt;load(&#8216;IsLogged&#8217;)<br />
#1 /usr/local/zend/share/ZendFramework/library/Zend/View/Abstract.php(610): Zend_View_Abstract-&gt;_getPlugin(&#8216;helper&#8217;, &#8216;isLogged&#8217;)<br />
#2 /usr/local/zend/share/ZendFramework/library/Zend/View/Abstract.php(336): Zend_View_Abstract-&gt;getHelper(&#8216;isLogged&#8217;)<br />
#3 /Users/gullo/Sites/myproject/application/views/scripts/header.phtml(3): Zend_View_Abstract-&gt;__call(&#8216;isLogged&#8217;, Array)<br />
#4 /Users/gullo/Sites/myproject/application/views/scripts/header.phtml(3): Zend_View-&gt;isLogged()<br />
#5 /usr/local/zend/share/ZendFramework/library/Zend/View.php(108): include(&#8216;/Users/gullo/Si&#8230;&#8217;)<br />
#6 /usr/local/zend/share/ZendFramework/library/Zend/View/Abstract.php(880) in /usr/local/zend/share/ZendFramework/library/Zend/Loader/PluginLoader.php on line 412</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ladislav</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-8520</link>
		<dc:creator>Ladislav</dc:creator>
		<pubDate>Sun, 03 Oct 2010 15:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-8520</guid>
		<description>kaller you should know I agree with you!</description>
		<content:encoded><![CDATA[<p>kaller you should know I agree with you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 5f5f7a</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-8518</link>
		<dc:creator>5f5f7a</dc:creator>
		<pubDate>Sun, 03 Oct 2010 12:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-8518</guid>
		<description>you can call view helper in action
as 

$this-&gt;view-&gt;helperName(); 

and it works just fine...</description>
		<content:encoded><![CDATA[<p>you can call view helper in action<br />
as </p>
<p>$this-&gt;view-&gt;helperName(); </p>
<p>and it works just fine&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomáš</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-8464</link>
		<dc:creator>Tomáš</dc:creator>
		<pubDate>Wed, 29 Sep 2010 16:20:01 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-8464</guid>
		<description>I expect in the solution in file
application/view/helpers/State.php on line 7
should be
[code]$this-&gt;_list = new Model_DbTable_States();[/code]

am I right?</description>
		<content:encoded><![CDATA[<p>I expect in the solution in file<br />
application/view/helpers/State.php on line 7<br />
should be</p>
<pre class="brush: plain; title: ; notranslate">$this-&gt;_list = new Model_DbTable_States();</pre>
<p>am I right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Noble</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-7745</link>
		<dc:creator>Jake Noble</dc:creator>
		<pubDate>Fri, 30 Jul 2010 12:45:12 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-7745</guid>
		<description>Ah, Wordpress. The savior and bane of so many.

Anyway, once I removed the double quotes it was what I needed :-)</description>
		<content:encoded><![CDATA[<p>Ah, WordPress. The savior and bane of so many.</p>
<p>Anyway, once I removed the double quotes it was what I needed <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vedran</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-7744</link>
		<dc:creator>Vedran</dc:creator>
		<pubDate>Fri, 30 Jul 2010 11:07:50 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-7744</guid>
		<description>@Jake Noble

yea, I&#039;m also mad at &quot;Windows OS double quotes&quot; when I used to copy-paste other&#039;s  people free code samples..

But this is something that Wordpress does and I&#039;m not supposed to take care of &quot;Windows OS double quotes&quot;</description>
		<content:encoded><![CDATA[<p>@Jake Noble</p>
<p>yea, I&#8217;m also mad at &#8220;Windows OS double quotes&#8221; when I used to copy-paste other&#8217;s  people free code samples..</p>
<p>But this is something that WordPress does and I&#8217;m not supposed to take care of &#8220;Windows OS double quotes&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Noble</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-7743</link>
		<dc:creator>Jake Noble</dc:creator>
		<pubDate>Fri, 30 Jul 2010 10:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-7743</guid>
		<description>@vedran This line which is not marked as code in your example

[code]resources.view.helperPath = APPLICATION_PATH “/views/helpers”[/code]

 This line is code even if it&#039;s not in code tags, it&#039;s useful. I found this page after Googling for an effective way of adding view helper directories to an app.

Food that isn&#039;t on a plate is still food?</description>
		<content:encoded><![CDATA[<p>@vedran This line which is not marked as code in your example</p>
<pre class="brush: plain; title: ; notranslate">resources.view.helperPath = APPLICATION_PATH “/views/helpers”</pre>
<p> This line is code even if it&#8217;s not in code tags, it&#8217;s useful. I found this page after Googling for an effective way of adding view helper directories to an app.</p>
<p>Food that isn&#8217;t on a plate is still food?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vedran</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-7740</link>
		<dc:creator>Vedran</dc:creator>
		<pubDate>Fri, 30 Jul 2010 07:00:58 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-7740</guid>
		<description>@Jake Noble

Form post text or from code sample?

I just don&#039;t see the issue here, 
part you need is code sample which work on all platforms.</description>
		<content:encoded><![CDATA[<p>@Jake Noble</p>
<p>Form post text or from code sample?</p>
<p>I just don&#8217;t see the issue here,<br />
part you need is code sample which work on all platforms.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Noble</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-7737</link>
		<dc:creator>Jake Noble</dc:creator>
		<pubDate>Fri, 30 Jul 2010 00:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-7737</guid>
		<description>Please Please take the Windows OS double quotes out of your post! People - like me - will spend hours trying to wonder what is wrong, then give up and never use your solution.</description>
		<content:encoded><![CDATA[<p>Please Please take the Windows OS double quotes out of your post! People &#8211; like me &#8211; will spend hours trying to wonder what is wrong, then give up and never use your solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donnie</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-7459</link>
		<dc:creator>Donnie</dc:creator>
		<pubDate>Sat, 26 Jun 2010 20:06:51 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-7459</guid>
		<description>Congrats! You were the only one on the whole internet who could explain this in plain english. Come on all you ZF people out there and follow this example ;)</description>
		<content:encoded><![CDATA[<p>Congrats! You were the only one on the whole internet who could explain this in plain english. Come on all you ZF people out there and follow this example <img src='http://inchoo.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kaller</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-6202</link>
		<dc:creator>kaller</dc:creator>
		<pubDate>Sun, 14 Feb 2010 19:11:56 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-6202</guid>
		<description>Well yes and no IMHO.
The controller&#039;s job is to service the request.
When that logic has nothing to do with some other part of a page then there is no need to complicate your controllers doing stuff that maybe belongs more to the view or layout, than the request itself.
The controller needs to control what should be under its control - the request.
But the view should only be accessing data for read purposes in that case, not for writing, and there is one danger - a proxy object would make it safer to do this kind of thing so the view is not given full update access to the model.
Current thinking seems to be that one way to organise this kind of view+model oriented logic is to have a service layer or service class as a kind of middleware I guess, that can dispense aspects of the model to views (or helpers), and also helps to abstract the ORM stuff.
But its not in the ZF yet of course.
So having said that, I would agree that when there is data that is directly involved with the request per se, then first there should be a conversation between the controller and the model and the view should wait patiently until that is done.</description>
		<content:encoded><![CDATA[<p>Well yes and no IMHO.<br />
The controller&#8217;s job is to service the request.<br />
When that logic has nothing to do with some other part of a page then there is no need to complicate your controllers doing stuff that maybe belongs more to the view or layout, than the request itself.<br />
The controller needs to control what should be under its control &#8211; the request.<br />
But the view should only be accessing data for read purposes in that case, not for writing, and there is one danger &#8211; a proxy object would make it safer to do this kind of thing so the view is not given full update access to the model.<br />
Current thinking seems to be that one way to organise this kind of view+model oriented logic is to have a service layer or service class as a kind of middleware I guess, that can dispense aspects of the model to views (or helpers), and also helps to abstract the ORM stuff.<br />
But its not in the ZF yet of course.<br />
So having said that, I would agree that when there is data that is directly involved with the request per se, then first there should be a conversation between the controller and the model and the view should wait patiently until that is done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ladislav</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-5944</link>
		<dc:creator>Ladislav</dc:creator>
		<pubDate>Fri, 22 Jan 2010 23:40:24 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-5944</guid>
		<description>I dont think that is a valid MVC aproach to fetch model in the view helper. This is the task of application logic - controllers. After you can wrap data using view helpers.</description>
		<content:encoded><![CDATA[<p>I dont think that is a valid MVC aproach to fetch model in the view helper. This is the task of application logic &#8211; controllers. After you can wrap data using view helpers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marius</title>
		<link>http://inchoo.net/tools-frameworks/zend/zend-framework-custom-view-helper/comment-page-1/#comment-5765</link>
		<dc:creator>Marius</dc:creator>
		<pubDate>Mon, 04 Jan 2010 17:05:22 +0000</pubDate>
		<guid isPermaLink="false">http://inchoo.net/?p=2960#comment-5765</guid>
		<description>great great tip, unfortunately I&#039;ve get here after I&#039;ve spent few hours on searching how this should be done.</description>
		<content:encoded><![CDATA[<p>great great tip, unfortunately I&#8217;ve get here after I&#8217;ve spent few hours on searching how this should be done.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

