<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>No Meaning Developer &#187; Rules &amp; Conditions</title>
	<atom:link href="http://kentreez.com/blog/category/php/rules-conditions/feed/" rel="self" type="application/rss+xml" />
	<link>http://kentreez.com/blog</link>
	<description>kentreez&#039;s blog</description>
	<lastBuildDate>Tue, 05 Jul 2011 16:13:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Matchbox 0.9.4 URI</title>
		<link>http://kentreez.com/blog/php/matchbox-094-uri/</link>
		<comments>http://kentreez.com/blog/php/matchbox-094-uri/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 07:08:27 +0000</pubDate>
		<dc:creator>kentreez</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Rules & Conditions]]></category>

		<guid isPermaLink="false">http://journal.kentreez.com/?p=31</guid>
		<description><![CDATA[Matchbox Ref: http://code.google.com/p/matchbox/ ผมตั้งชื่อ Module กับชื่อ Controller ใน Module เป็นชื่อเดียวกันครับ ก็เลยเกิดข้อผิดพลาดในการ parse route ตอนแรกก็เข้าใจว่าเป็น Bug ของ Matchbox ครับ. แต่จริงๆ แล้วไม่ใช่ครับ เป็นความจงใจของ Zacharias Knudsen เค้าครับ มีกฎดังนี้ครับ www.example.com/module/controller/method/parameter The first segment represents the module in which the controller can be found. The second segment represents the controller that should be invoked. The third segment represents the method [...]]]></description>
			<content:encoded><![CDATA[<p>Matchbox Ref: <a href="http://code.google.com/p/matchbox/">http://code.google.com/p/matchbox/</a></p>
<p>ผมตั้งชื่อ Module กับชื่อ Controller ใน Module เป็นชื่อเดียวกันครับ  ก็เลยเกิดข้อผิดพลาดในการ parse route ตอนแรกก็เข้าใจว่าเป็น Bug ของ Matchbox ครับ. แต่จริงๆ แล้วไม่ใช่ครับ เป็นความจงใจของ Zacharias Knudsen เค้าครับ</p>
<p>มีกฎดังนี้ครับ<br />
<code>www.example.com/module/controller/method/parameter</code></p>
<ol>
<li>The first segment represents the module in which the controller can be found.</li>
<li>The second segment represents the controller that should be invoked.</li>
<li>The third segment represents the method that should be called.</li>
<li>The fourth, and any additional segments, represents the variables that will be passed to the controller.</li>
</ol>
<p>และมีเงื่อนไขดังนี้</p>
<ol>
<li>If the controller is located in a subfolder then the subfolder must be added as another segment between the module and controller segments.<br />
(ถ้า controller อยู่ใน subfolder ให้ใส่ subfolder ไปใน URI ด้วย ตรงระหว่าง module กับ controller อันนี้ค่อนข้าง make sence ครับ ไม่มีอะไรมาก)</li>
<li>If the controller have the same name as the module, the controller segment can be omitted.<br />
(<strong>ถ้า controller ชื่อเดียวกับ module ให้ละชื่อ controller</strong> ใน URI ครับ ก็จะกลายเปน www.example.com/module/method/parameter)</li>
<li>If the controller is in a subfolder and have the same name as the subfolder, the controller segment can be omitted.<br />
(<strong>ถ้า controller ชื่อเดียวกับ subfolder ให้ละชื่อ controller</strong> ใน URI )</li>
</ol>
<p>แล้วถ้า module, subfolder และ controller ชื่อเดียวกันหมดละ!?</p>
<p>อันนี้ผมทำการทดลองให้แล้วครับ ก็คือให้ละชื่อ controller เช่นเดิมครับ โดยจะต้องระบุ module และ subfolder ไว้ใน URI</p>
]]></content:encoded>
			<wfw:commentRss>http://kentreez.com/blog/php/matchbox-094-uri/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

