<?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: Using View Helpers to Build Rich, Scalable, Controls</title>
	<atom:link href="http://www.killerphp.com/articles/zend-framework-view-helpers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.killerphp.com/articles/zend-framework-view-helpers/</link>
	<description>Dedicated to teaching web designers PHP.</description>
	<lastBuildDate>Wed, 10 Mar 2010 21:01:29 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Drevak</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/comment-page-1/#comment-83113</link>
		<dc:creator>Drevak</dc:creator>
		<pubDate>Sun, 25 Jan 2009 14:36:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-83113</guid>
		<description>You dont need to instance a new Zend_view object, just define a setView method in your helper, like this:

	public $view;
	
	public function setView(Zend_View_Interface $view)
    {
        $this-&gt;view = $view;
    }</description>
		<content:encoded><![CDATA[<p>You dont need to instance a new Zend_view object, just define a setView method in your helper, like this:</p>
<p>	public $view;</p>
<p>	public function setView(Zend_View_Interface $view)<br />
    {<br />
        $this-&gt;view = $view;<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elijah Insua</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/comment-page-1/#comment-76292</link>
		<dc:creator>Elijah Insua</dc:creator>
		<pubDate>Mon, 24 Mar 2008 04:07:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-76292</guid>
		<description>I have used this method with various php frameworks many times.  I actually prefer breaking up my templates and following a half &#039;naked objects&#039; approach where the actual item that you are working with contains the templates and business logic.</description>
		<content:encoded><![CDATA[<p>I have used this method with various php frameworks many times.  I actually prefer breaking up my templates and following a half &#8216;naked objects&#8217; approach where the actual item that you are working with contains the templates and business logic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zend Framework: Using View Helpers to Build Rich, Scalable, Controls</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/comment-page-1/#comment-76286</link>
		<dc:creator>Zend Framework: Using View Helpers to Build Rich, Scalable, Controls</dc:creator>
		<pubDate>Sat, 22 Mar 2008 19:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-76286</guid>
		<description>[...] More: continued here [...]</description>
		<content:encoded><![CDATA[<p>[...] More: continued here [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Lebensold</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/comment-page-1/#comment-76188</link>
		<dc:creator>Jon Lebensold</dc:creator>
		<pubDate>Thu, 28 Feb 2008 07:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-76188</guid>
		<description>@Lee: Thanks for mentioning this! I was looking for a way to call View Helpers without creating a whole new Zend_View or having to create custom classes that would be called from a view helper only for some instances.</description>
		<content:encoded><![CDATA[<p>@Lee: Thanks for mentioning this! I was looking for a way to call View Helpers without creating a whole new Zend_View or having to create custom classes that would be called from a view helper only for some instances.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/comment-page-1/#comment-72004</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Tue, 12 Feb 2008 02:03:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-72004</guid>
		<description>This is a great post! I am in need of partials in my project and this post set me on the right path to figuring out how to do it. I&#039;m not using AJAX but this idea is very useful. The only thing I am doing differently is that instead of instantiating a new Zend_View and setting the basepath in my View Helper I am retrieving the View Helper that is already initialized in my View Renderer like this:

$view = Zend_Controller_Action_HelperBroker::getExistingHelper(&#039;viewRenderer&#039;)-&gt;view;

Then you can set variables for your view scripts and render them like this:

$view-&gt;someVar = &quot;someValue&quot;;
$out = $view-&gt;render(&quot;path/to/viewScript.phtml&quot;); 
return $out;

This saves you from having to create a brand new Zend_View and trying to figure out how to set the basepath in a portable way. You do need to be mindful of the fact that you aren&#039;t creating a new namespace for your partial so be ware of variable name clashes. Since you are reusing the same view your controller is using, anything you set using $this-&gt;view-&gt;whatever will also be available in your partial view script as $this-&gt;whatever.</description>
		<content:encoded><![CDATA[<p>This is a great post! I am in need of partials in my project and this post set me on the right path to figuring out how to do it. I&#8217;m not using AJAX but this idea is very useful. The only thing I am doing differently is that instead of instantiating a new Zend_View and setting the basepath in my View Helper I am retrieving the View Helper that is already initialized in my View Renderer like this:</p>
<p>$view = Zend_Controller_Action_HelperBroker::getExistingHelper(&#8217;viewRenderer&#8217;)-&gt;view;</p>
<p>Then you can set variables for your view scripts and render them like this:</p>
<p>$view-&gt;someVar = &#8220;someValue&#8221;;<br />
$out = $view-&gt;render(&#8221;path/to/viewScript.phtml&#8221;);<br />
return $out;</p>
<p>This saves you from having to create a brand new Zend_View and trying to figure out how to set the basepath in a portable way. You do need to be mindful of the fact that you aren&#8217;t creating a new namespace for your partial so be ware of variable name clashes. Since you are reusing the same view your controller is using, anything you set using $this-&gt;view-&gt;whatever will also be available in your partial view script as $this-&gt;whatever.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Lebensold &#187; Blog Archive &#187; Article on Zend View Helpers</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/comment-page-1/#comment-61235</link>
		<dc:creator>Jon Lebensold &#187; Blog Archive &#187; Article on Zend View Helpers</dc:creator>
		<pubDate>Fri, 01 Feb 2008 08:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-61235</guid>
		<description>[...] Another article has been posted on KillerPHP. This one is about Zend View_Helpers. I&#8217;ve been struggling with a good Zend Framework architecture that provides a development roadmap where controller logic can be easily refactored into AJAX controls. At work I&#8217;ve been researching web services for AJAX integration on the ASP.NET tip of things due to the lack of user-control support for AJAX.NET controls. I&#8217;m also not very impressed with the AJAX.NET Extenders since they seem to mix data that would be gathered from a web service and its presentation on the client. [...]</description>
		<content:encoded><![CDATA[<p>[...] Another article has been posted on KillerPHP. This one is about Zend View_Helpers. I&#8217;ve been struggling with a good Zend Framework architecture that provides a development roadmap where controller logic can be easily refactored into AJAX controls. At work I&#8217;ve been researching web services for AJAX integration on the ASP.NET tip of things due to the lack of user-control support for AJAX.NET controls. I&#8217;m also not very impressed with the AJAX.NET Extenders since they seem to mix data that would be gathered from a web service and its presentation on the client. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
