<?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>Transphorm Technologies, LLC &#187; kohana</title>
	<atom:link href="http://transphorm.com/tag/kohana/feed" rel="self" type="application/rss+xml" />
	<link>http://transphorm.com</link>
	<description>Not just another tech company in Hawaii</description>
	<lastBuildDate>Fri, 27 Aug 2010 10:12:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Kohana Validation Cheatsheet</title>
		<link>http://transphorm.com/kohana-validation-cheatsheet</link>
		<comments>http://transphorm.com/kohana-validation-cheatsheet#comments</comments>
		<pubDate>Mon, 15 Dec 2008 12:26:59 +0000</pubDate>
		<dc:creator>Justin Hernandez</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[kohana]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://blog.transphorm.com/kohana-validation-cheatsheet</guid>
		<description><![CDATA[Here is a cheatsheet that I copied from the Kohana docs and put into pdf format. Enjoy. Download]]></description>
			<content:encoded><![CDATA[<p>Here is a cheatsheet that I copied from the Kohana docs and put into pdf format. Enjoy.</p>
<p><a href='http://blog.transphorm.com/wp-content/uploads/2008/12/kohana_validation_rules.pdf'>Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://transphorm.com/kohana-validation-cheatsheet/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Kohaml &#8211; Haml Module for Kohana</title>
		<link>http://transphorm.com/kohaml-haml-module-for-kohana</link>
		<comments>http://transphorm.com/kohaml-haml-module-for-kohana#comments</comments>
		<pubDate>Thu, 04 Dec 2008 01:10:43 +0000</pubDate>
		<dc:creator>Justin Hernandez</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[kohana]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://blog.transphorm.com/?p=150</guid>
		<description><![CDATA[I&#8217;ve been itching to use Haml with my new fav framework Kohana, however I was severely disappointed by the current state of haml interpreters for php. I had a free evening the other night and decided to write my own php haml interpreter and integrate it into a module for Kohana. The end result is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been itching to use <a href="http://haml.hamptoncatlin.com/">Haml</a> with my new fav framework Kohana, however I was severely disappointed by the current state of haml interpreters for php. I had a free evening the other night and decided to write my own php haml interpreter and integrate it into a module for Kohana. The end result is tada! &#8211; Kohaml,  YAHOO!!! Okay while it may not save a life, Haml will definitely save you time and stress, as long as you can keep indentation monster off your back.</p>
<h5><a href="http://github.com/justinhernandez/kohaml/zipball/master">Download</a><br />
<a href="http://github.com/justinhernandez/kohaml/tree/master">Github</a></h5>
<p>Kohaml takes this:</p>
<pre><code class="html">
!!!
%html
  %head
    %title#content.wow{a =&gt; 'hello'} Hello World
  %body
    .wow hhaha
      %strong{'class' =&gt; "code", 'id' =&gt; "message"} Hello, World! &lt;? 'howdy' ?&gt;
      %b Hello World
      %peanutbutterjelly
        / This is the peanutbutterjelly element
        .helloa &lt;?= $wow ?&gt;
        #woa was
        %br/
    #foo=   $wow
      hahaa
      %b{'class' =&gt; 'type'}= $hello
    %sandwich{'delicious' =&gt; 'true', 'more' = 'okay'}
    .wowaa he
      |&lt;?php echo('wuttup'); ?&gt;
    |&lt;?php echo('wuttup'); ?&gt;
      |&lt;?php echo('wuttup'); ?&gt;
        #wow.escape
      |&lt;?php echo('okay') ?&gt;
    |&lt;?php echo('wuttup'); ?&gt;
    %ul
      %li &lt;?php 'hello' ?&gt; jadsf &lt;?php 'aa' ?&gt;
      %li Pepper
      / heloaf
</code></pre>
<p>And turns it into this:</p>
<pre><code class="html">
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;title "class"="wow" "id"="content" "a"="hello"&gt;Hello World&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div "class"="wow"&gt;
      hhaha
      &lt;strong "class"="code" "id"="message"&gt;Hello, World! &lt;? 'howdy' ?&gt;&lt;/strong&gt;
      &lt;b&gt;Hello World&lt;/b&gt;
      &lt;peanutbutterjelly&gt;
        &lt;!-- This is the peanutbutterjelly element --&gt;
        &lt;div "class"="helloa"&gt;&lt;?= $wow ?&gt;&lt;/div&gt;
        &lt;div "id"="woa"&gt;wasaa&lt;/div&gt;
        &lt;br/&gt;
      &lt;/peanutbutterjelly&gt;
    &lt;/div&gt;
    &lt;div "id"="foo"&gt;
      &lt;?= $wow ?&gt;
      hahaa
      &lt;b "class"="type"&gt;&lt;?= $hello ?&gt;&lt;/b&gt;
    &lt;/div&gt;
    &lt;sandwich "delicious"="true" "more"="okay"&gt;&lt;/sandwich&gt;
    &lt;div "class"="wowaa"&gt;
      he
      &lt;?php echo('wuttup'); ?&gt;
    &lt;/div&gt;
    &lt;?php echo('wuttup'); ?&gt;
      &lt;?php echo('wuttup'); ?&gt;
        &lt;div "class"="escape" "id"="wow"&gt;&lt;/div&gt;
      &lt;?php echo('okay') ?&gt;
    &lt;?php echo('wuttup'); ?&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;?php 'hello' ?&gt; jadsf &lt;?php 'aa' ?&gt;&lt;/li&gt;
      &lt;li&gt;Pepper&lt;/li&gt;
      &lt;!-- heloaf --&gt;
    &lt;/ul&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>Here is a brief overview of how to use Kohaml. The above example makes use of all the rules, check out http://SERVER_NAME/kohaml for a demo.</p>
<p><strong>Rules:</strong></p>
<ul>
<li>% &#8211; Define an element tag: %b = &lt;b&gt;. If using % it must be at the start of line. Can be used with . and #.</li>
<li># &#8211; Id. #content = &lt;div id=&#8221;content&#8221;&gt;&lt;/div&gt;. Can be used with . and %. Multiple #&#8217;s can be used.</li>
<li>. &#8211; Class. .my_rows = &lt;div class=&#8221;my_rows&#8221;&gt;&lt;/div&gt;. Can be used with # and %. Multiple .&#8217;s can be used.</li>
<li>{ }  &#8211; specifies attributes for that element. %sandwich{&#8216;delicious&#8217; = &#8216;true&#8217;, &#8216;more&#8217; = &#8216;okay&#8217;} = &lt;sandwich &#8220;delicious&#8221;=&#8221;true&#8221; &#8220;more&#8221;=&#8221;okay&#8221;&gt;&lt;/sandwich&gt;</li>
<li>&lt;? &#8211; At the beginning of a line specifies a line of php code and the line and depth are ignored.</li>
<li>| &#8211; At the beginning of a line of php code will take that line of php into account. Use | for nesting php code within elements.</li>
<li>/ &#8211; At the beginning of a line defines a comment. Comments can be nested.</li>
<li>/ &#8211; At the ending of line creates a self-closing tag. %br/ = &lt;br/&gt;</li>
</ul>
<p><strong>Guidelines:</strong></p>
<ul>
<li>Putting text at the end of element declaration will wrap it. #element myText = &lt;element&gt;myText&lt;/element&gt;</li>
<li>To nest element or text use 2 spaces. Haml is indent sensitive. Kohaml will raise an error on incorrect indentation.</li>
<li>Any php within a line (not at the start of a line) will be kept intact</li>
</ul>
<p><strong>Shortcuts:</strong></p>
<ul>
<li>#element= $var = &lt;element&gt;&lt;?= $var ?&gt;&lt;/element&gt;</li>
<li>load(myTemplate) will generate a function to load a sub-view into the current file. Will also nest and indent appropriately. Declared at the beginning of the line.</li>
<li>#elment= load(myTemplate) = will load a haml template and nest it within the element</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://transphorm.com/kohaml-haml-module-for-kohana/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
