<?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: Url Routing with PHP &#8211; Part Three</title>
	<atom:link href="http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 00:46:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Tai Sheppard</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-272134</link>
		<dc:creator>Tai Sheppard</dc:creator>
		<pubDate>Wed, 05 Oct 2011 22:04:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-272134</guid>
		<description>This is exactly what I was looking for.  I needed a dispatcher class that would pass url cruft as variable intact to the methods in the class.

One thing that isn&#039;t correct though is that you need to test the class for the called method and then adjust the command parameters so that dispatcher doesn&#039;t mistake a parameter for the method.

This way you can call the default method with parameters which you can&#039;t do with the script as you have it posted here.

If you call /test/param1/param2/param3 for instance, the dispatcher will use param1 as your method.  Simply test the controller for the method using method_exists() and if it fails, array_unshift() to add param1 to your existing parameters.

Otherwise ... KILLER job Doug, thanks a bunch.

Tai</description>
		<content:encoded><![CDATA[<p>This is exactly what I was looking for.  I needed a dispatcher class that would pass url cruft as variable intact to the methods in the class.</p>
<p>One thing that isn't correct though is that you need to test the class for the called method and then adjust the command parameters so that dispatcher doesn't mistake a parameter for the method.</p>
<p>This way you can call the default method with parameters which you can't do with the script as you have it posted here.</p>
<p>If you call /test/param1/param2/param3 for instance, the dispatcher will use param1 as your method.  Simply test the controller for the method using method_exists() and if it fails, array_unshift() to add param1 to your existing parameters.</p>
<p>Otherwise &#8230; KILLER job Doug, thanks a bunch.</p>
<p>Tai</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sike</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-272101</link>
		<dc:creator>sike</dc:creator>
		<pubDate>Fri, 08 Jul 2011 17:56:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-272101</guid>
		<description>Thank you very much for these articles and I do hope you continue the series -I have found them very useful</description>
		<content:encoded><![CDATA[<p>Thank you very much for these articles and I do hope you continue the series -I have found them very useful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Hill</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-272078</link>
		<dc:creator>Doug Hill</dc:creator>
		<pubDate>Wed, 08 Jun 2011 21:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-272078</guid>
		<description>The &amp; sign denotes a pass by reference variable.

Doug</description>
		<content:encoded><![CDATA[<p>The &amp; sign denotes a pass by reference variable.</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: B@stian</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-272071</link>
		<dc:creator>B@stian</dc:creator>
		<pubDate>Wed, 25 May 2011 08:16:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-272071</guid>
		<description>Hi,
I am wondering what the &#039;&amp;&#039; before $command means?
for example you are using it here:
function Axial_CommandDispatcher(&amp;$command)
and function Axial_Controller(&amp;$command)

Could you please explain it ?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I am wondering what the '&amp;' before $command means?<br />
for example you are using it here:<br />
function Axial_CommandDispatcher(&amp;$command)<br />
and function Axial_Controller(&amp;$command)</p>
<p>Could you please explain it ?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vulo</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-50728</link>
		<dc:creator>vulo</dc:creator>
		<pubDate>Tue, 06 Oct 2009 02:50:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-50728</guid>
		<description>Hi, I have problem with the url router, as it reload 2 3 times before to load the page, of course it is too fast for a normal use to see it, but I include mail sending of every execution of the url-array.
So

I receive that these values are loaded into the url array before the actual data from the URL is loaded

AC_RunActiveContent.js
Scripts
robots.txt
/not the same every time/

and then
the actual URL parameter - &#039;event&#039; or &#039;contacts&#039;
I am using some session messages, that&#039;s how i find this &quot;bug&quot;.

question:
Has anyone have ides, why this is happening.
Thanks in advance
Vulo</description>
		<content:encoded><![CDATA[<p>Hi, I have problem with the url router, as it reload 2 3 times before to load the page, of course it is too fast for a normal use to see it, but I include mail sending of every execution of the url-array.<br />
So</p>
<p>I receive that these values are loaded into the url array before the actual data from the URL is loaded</p>
<p>AC_RunActiveContent.js<br />
Scripts<br />
robots.txt<br />
/not the same every time/</p>
<p>and then<br />
the actual URL parameter &#8211; 'event' or 'contacts'<br />
I am using some session messages, that's how i find this "bug".</p>
<p>question:<br />
Has anyone have ides, why this is happening.<br />
Thanks in advance<br />
Vulo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zsolt sandor</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-24742</link>
		<dc:creator>zsolt sandor</dc:creator>
		<pubDate>Thu, 04 Dec 2008 20:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-24742</guid>
		<description>Hi 

a nice tutorial, ad the first url router witch works on all servers / a least on those teht i tried / 

question:
should be the exampleutils.php the model?</description>
		<content:encoded><![CDATA[<p>Hi </p>
<p>a nice tutorial, ad the first url router witch works on all servers / a least on those teht i tried / </p>
<p>question:<br />
should be the exampleutils.php the model?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Handy</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-9539</link>
		<dc:creator>Handy</dc:creator>
		<pubDate>Fri, 11 Apr 2008 23:33:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-9539</guid>
		<description>Thank you for the tutorial. Zend framework provides also a very good frontcontroller. So it might be a help to understand the functionality and build own frontcontroller.</description>
		<content:encoded><![CDATA[<p>Thank you for the tutorial. Zend framework provides also a very good frontcontroller. So it might be a help to understand the functionality and build own frontcontroller.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-6483</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Thu, 21 Feb 2008 05:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-6483</guid>
		<description>Hi Doug, nice tutorial btw, really clarified MVC for me. I&#039;ve been using on open source MVC framework and I&#039;m looking to build my own now :) Anyway one thing that did demystify me in your tutorial is models - where are they? Could you illustrated within your sample code how you could implement one?

Cheers</description>
		<content:encoded><![CDATA[<p>Hi Doug, nice tutorial btw, really clarified MVC for me. I've been using on open source MVC framework and I'm looking to build my own now <img src='http://www.phpaddiction.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Anyway one thing that did demystify me in your tutorial is models &#8211; where are they? Could you illustrated within your sample code how you could implement one?</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Hill</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-3125</link>
		<dc:creator>Doug Hill</dc:creator>
		<pubDate>Sun, 18 Nov 2007 15:11:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-3125</guid>
		<description>John if you look at the Axial_UrlInterpreter class you will see that you can modify how the url is transformed into a command object.  Instead of the way I did it you could make it handle the parameters as key =&gt; value pairs... or any other way you want.  If i get a little time this week i&#039;ll write a new article that covers this.

The urls in the blog come from wordpress not my doing!  

Doug</description>
		<content:encoded><![CDATA[<p>John if you look at the Axial_UrlInterpreter class you will see that you can modify how the url is transformed into a command object.  Instead of the way I did it you could make it handle the parameters as key => value pairs&#8230; or any other way you want.  If i get a little time this week i'll write a new article that covers this.</p>
<p>The urls in the blog come from wordpress not my doing!  </p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/comment-page-1/#comment-3093</link>
		<dc:creator>John</dc:creator>
		<pubDate>Sat, 17 Nov 2007 19:50:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/#comment-3093</guid>
		<description>Thank you Doug. It would be great if we could get/post/request parameter value by calling its name.
ie

echo&quot;$params[id]&quot;;

http://localhost/mvc/test/dostuff/id/23/page/3/sort/true

echo&quot;$params[id],$params[page],$params[sort]&quot;;

so, it will prints 23,3,true

How did you managed to get url like this http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/

Did you use MVC method or it is done using .htaccess ?

Regards</description>
		<content:encoded><![CDATA[<p>Thank you Doug. It would be great if we could get/post/request parameter value by calling its name.<br />
ie</p>
<p>echo"$params[id]";</p>
<p><a href="http://localhost/mvc/test/dostuff/id/23/page/3/sort/true" rel="nofollow">http://localhost/mvc/test/dostuff/id/23/page/3/sort/true</a></p>
<p>echo"$params[id],$params[page],$params[sort]";</p>
<p>so, it will prints 23,3,true</p>
<p>How did you managed to get url like this <a href="http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/" rel="nofollow">http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/</a></p>
<p>Did you use MVC method or it is done using .htaccess ?</p>
<p>Regards</p>
]]></content:encoded>
	</item>
</channel>
</rss>

