<?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>Wes Ray &#187; Kohana</title>
	<atom:link href="http://www.wessray.com/category/kohana/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wessray.com</link>
	<description>Just another idiot with a blog</description>
	<lastBuildDate>Fri, 12 Nov 2010 09:21:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Kohana 3 Name Spacing with Underscores in Controller Classes</title>
		<link>http://www.wessray.com/php/kohana-3-name-spacing-with-underscores-in-controller-classes/</link>
		<comments>http://www.wessray.com/php/kohana-3-name-spacing-with-underscores-in-controller-classes/#comments</comments>
		<pubDate>Sun, 02 May 2010 22:44:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ko3]]></category>

		<guid isPermaLink="false">http://www.wessray.com/?p=111</guid>
		<description><![CDATA[
		
		
		
		So, I&#8217;ve been working with Kohana 2.3.4 lately and its absolutely beautiful.  A much improved version of what Codeigniter should have been.  Now they released Kohana 3 which is similar, yet very different.  One of the &#8220;gotchas&#8221; I noticed in KO3 (Kohana 3) is the auto loading of controller classes and the [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.wessray.com/php/kohana-3-name-spacing-with-underscores-in-controller-classes/";
		digg_bgcolor = "";
		digg_skin = "";
		digg_window = "";
		digg_title = "Kohana+3+Name+Spacing+with+Underscores+in+Controller+Classes";
		digg_media = "";
		digg_topic = "";
		digg_bodytext = "";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>So, I&#8217;ve been working with Kohana 2.3.4 lately and its absolutely beautiful.  A much improved version of what Codeigniter should have been.  Now they released Kohana 3 which is similar, yet very different.  One of the &#8220;gotchas&#8221; I noticed in KO3 (Kohana 3) is the auto loading of controller classes and the name spacing with underscores.  Here is an example of what I&#8217;m talking about.</p>
<h1>All underscores are converted to slashes</h1>
<p>In Kohana 2 you could name a class with underscores and there would be no problem</p>
<p>now the underscores are converted to slashes</p>
<p>
notice the <strong>Controller_</strong> is in the front now which translates to controller/
</p>
<p>
Within the classes folder in application you notice there is classes/controllers to keep for instance a file extending off template.
</p>
<p>
So a template in controllers would need to be named <strong>defaulttemplate.php</strong> which would become <strong>Controller_DefaultTemplate</strong>, BUT if you wanted it to be Controller_Default_Template it would have to be in a sub folder called Default in controllers then <strong>template.php</strong>
</p>
<p>
Its a bit confusing in the beginning but you&#8217;ll get used to it.  The entire system is a helluva improvement.  Look forward to a few articles i&#8217;ll be writing on using the ORM.
</p>
<p>Cheers,<br />
<strong>-Wes</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wessray.com/php/kohana-3-name-spacing-with-underscores-in-controller-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

