<?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: MyUrl view helper for Zend Framework</title>
	<atom:link href="http://robertbasic.com/blog/myurl-view-helper-for-zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://robertbasic.com/blog/myurl-view-helper-for-zend-framework/</link>
	<description>the magic of coding...</description>
	<lastBuildDate>Sun, 08 Jan 2012 19:22:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jobinma</title>
		<link>http://robertbasic.com/blog/myurl-view-helper-for-zend-framework/#comment-3232</link>
		<dc:creator>Jobinma</dc:creator>
		<pubDate>Thu, 06 Aug 2009 02:10:54 +0000</pubDate>
		<guid isPermaLink="false">http://robertbasic.com/blog/?p=427#comment-3232</guid>
		<description>What about the solution I proposed on ZF Forums :

http://www.zfforums.com/zend-framework-components-13/core-infrastructure-19/how-can-i-pass-variable-while-using-zend_paginator-2589.html#post11796

Sounds a lot easier!</description>
		<content:encoded><![CDATA[<p>What about the solution I proposed on ZF Forums :</p>
<p><a href="http://www.zfforums.com/zend-framework-components-13/core-infrastructure-19/how-can-i-pass-variable-while-using-zend_paginator-2589.html#post11796" rel="nofollow">http://www.zfforums.com/zend-framework-components-13/core-infrastructure-19/how-can-i-pass-variable-while-using-zend_paginator-2589.html#post11796</a></p>
<p>Sounds a lot easier!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: umpirsky</title>
		<link>http://robertbasic.com/blog/myurl-view-helper-for-zend-framework/#comment-3217</link>
		<dc:creator>umpirsky</dc:creator>
		<pubDate>Fri, 31 Jul 2009 08:20:42 +0000</pubDate>
		<guid isPermaLink="false">http://robertbasic.com/blog/?p=427#comment-3217</guid>
		<description>Small improvement:

class Umpirsky_View_Helper_Qurl extends Zend_View_Helper_Abstract {
	/**
     * Generates an url given the name of a route, honors query string.
     *
     * @param  array $urlOptions Options passed to the assemble method of the Route object.
     * @param  mixed $name The name of a Route to use. If null it will use the current Route
     * @param  bool $reset Whether or not to reset the route defaults with those provided
     * @return string Url for the link href attribute.
     */
    public function qurl(array $urlOptions = array(), $name = null, $reset = false, $encode = true) {
    	$url = $this-&gt;view-&gt;url($urlOptions, $name, $reset, $encode);
        $requestUri = Zend_Controller_Front::getInstance()-&gt;getRequest()-&gt;getRequestUri();
        $query = parse_url($requestUri, PHP_URL_QUERY);
        if($query != &#039;&#039;) {
        	$url .= &#039;/&#039;;
        	$pairs = explode(&#039;&amp;&#039;, $query);
        	foreach ($pairs as $pair) {
        		$url.= str_replace(&#039;=&#039;, &#039;/&#039;, $pair) . &#039;/&#039;;
        	}
        }

        return $url;
      }
}

You use it same way as Zend_View_Helper_Url, just one letter diference :

qurl(array(&#039;param2&#039; =&gt; &#039;value2&#039;)); ?&gt;</description>
		<content:encoded><![CDATA[<p>Small improvement:</p>
<p>class Umpirsky_View_Helper_Qurl extends Zend_View_Helper_Abstract {<br />
	/**<br />
     * Generates an url given the name of a route, honors query string.<br />
     *<br />
     * @param  array $urlOptions Options passed to the assemble method of the Route object.<br />
     * @param  mixed $name The name of a Route to use. If null it will use the current Route<br />
     * @param  bool $reset Whether or not to reset the route defaults with those provided<br />
     * @return string Url for the link href attribute.<br />
     */<br />
    public function qurl(array $urlOptions = array(), $name = null, $reset = false, $encode = true) {<br />
    	$url = $this-&gt;view-&gt;url($urlOptions, $name, $reset, $encode);<br />
        $requestUri = Zend_Controller_Front::getInstance()-&gt;getRequest()-&gt;getRequestUri();<br />
        $query = parse_url($requestUri, PHP_URL_QUERY);<br />
        if($query != &#8221;) {<br />
        	$url .= &#8216;/&#8217;;<br />
        	$pairs = explode(&#8216;&amp;&#8217;, $query);<br />
        	foreach ($pairs as $pair) {<br />
        		$url.= str_replace(&#8216;=&#8217;, &#8216;/&#8217;, $pair) . &#8216;/&#8217;;<br />
        	}<br />
        }</p>
<p>        return $url;<br />
      }<br />
}</p>
<p>You use it same way as Zend_View_Helper_Url, just one letter diference :</p>
<p>qurl(array(&#8216;param2&#8242; =&gt; &#8216;value2&#8242;)); ?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://robertbasic.com/blog/myurl-view-helper-for-zend-framework/#comment-860</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Tue, 10 Feb 2009 03:08:48 +0000</pubDate>
		<guid isPermaLink="false">http://robertbasic.com/blog/?p=427#comment-860</guid>
		<description>Try to use something like this: $this-&gt;url(&#039;param2&#039; =&gt; &#039;value2&#039;, &#039;default&#039;, false), and be happy</description>
		<content:encoded><![CDATA[<p>Try to use something like this: $this-&gt;url(&#8216;param2&#8242; =&gt; &#8216;value2&#8242;, &#8216;default&#8217;, false), and be happy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Basic&#8217;s Blog: MyUrl view helper for Zend Framework : WebNetiques</title>
		<link>http://robertbasic.com/blog/myurl-view-helper-for-zend-framework/#comment-392</link>
		<dc:creator>Robert Basic&#8217;s Blog: MyUrl view helper for Zend Framework : WebNetiques</dc:creator>
		<pubDate>Wed, 03 Dec 2008 10:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://robertbasic.com/blog/?p=427#comment-392</guid>
		<description>[...] Basic has posted a view helper for the Zend Framework he&#8217;s developed - one to more correctly handle URLs without dropping [...]</description>
		<content:encoded><![CDATA[<p>[...] Basic has posted a view helper for the Zend Framework he&#8217;s developed &#8211; one to more correctly handle URLs without dropping [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://robertbasic.com/blog/myurl-view-helper-for-zend-framework/#comment-371</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Tue, 02 Dec 2008 21:27:50 +0000</pubDate>
		<guid isPermaLink="false">http://robertbasic.com/blog/?p=427#comment-371</guid>
		<description>@buck lay: ZF is my choice. Live with it. It has it&#039;s upsides and downsides and a few WTF?!&#039;s along the way, but that&#039;s how it goes with everything in life.

@Jasper: I&#039;ll shut up for a while, until something new comes up :P

Cheers!</description>
		<content:encoded><![CDATA[<p>@buck lay: ZF is my choice. Live with it. It has it&#8217;s upsides and downsides and a few WTF?!&#8217;s along the way, but that&#8217;s how it goes with everything in life.</p>
<p>@Jasper: I&#8217;ll shut up for a while, until something new comes up :P</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jasper</title>
		<link>http://robertbasic.com/blog/myurl-view-helper-for-zend-framework/#comment-370</link>
		<dc:creator>Jasper</dc:creator>
		<pubDate>Tue, 02 Dec 2008 21:02:31 +0000</pubDate>
		<guid isPermaLink="false">http://robertbasic.com/blog/?p=427#comment-370</guid>
		<description>You say that it&#039;s absurd to have a class that is a visual representation of a query string, but enough abstraction and need for that level of control over the query string does warrant it. 

Swapping frameworks just because treatment of URLs is easier isn&#039;t really decent enough justification, either, unless that&#039;s the sole function of your project.

Glad you managed to get it sorted, Robert - maybe now you can shut up about it on twitter :p</description>
		<content:encoded><![CDATA[<p>You say that it&#8217;s absurd to have a class that is a visual representation of a query string, but enough abstraction and need for that level of control over the query string does warrant it. </p>
<p>Swapping frameworks just because treatment of URLs is easier isn&#8217;t really decent enough justification, either, unless that&#8217;s the sole function of your project.</p>
<p>Glad you managed to get it sorted, Robert &#8211; maybe now you can shut up about it on twitter :p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: buck lay</title>
		<link>http://robertbasic.com/blog/myurl-view-helper-for-zend-framework/#comment-369</link>
		<dc:creator>buck lay</dc:creator>
		<pubDate>Tue, 02 Dec 2008 20:55:48 +0000</pubDate>
		<guid isPermaLink="false">http://robertbasic.com/blog/?p=427#comment-369</guid>
		<description>A whole class to add a query string seems a bit absurd. CakePHP does all of this for you and does it right. Is there are reason why you have to use Zend Framework? I think even Symfony can do these kinds of things without any trouble. Best of luck.</description>
		<content:encoded><![CDATA[<p>A whole class to add a query string seems a bit absurd. CakePHP does all of this for you and does it right. Is there are reason why you have to use Zend Framework? I think even Symfony can do these kinds of things without any trouble. Best of luck.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

