<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>my life as a sock</title>
    <link>http://notjosh.com/blog/</link>
    <description>words and word related items</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.1-beta6 - http://www.s9y.org/</generator>
    <pubDate>Thu, 04 Dec 2008 05:50:39 GMT</pubDate>

    <image>
        <url>http://notjosh.com/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: my life as a sock - words and word related items</title>
        <link>http://notjosh.com/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>OSDC Sydney 2008 slides (Going mobile)</title>
    <link>http://notjosh.com/blog/archives/65-OSDC-Sydney-2008-slides-Going-mobile.html</link>
    
    <comments>http://notjosh.com/blog/archives/65-OSDC-Sydney-2008-slides-Going-mobile.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=65</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=65</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    &lt;div style=&quot;width:425px;text-align:left&quot; id=&quot;__ss_816080&quot;&gt;&lt;a style=&quot;font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;&quot; href=&quot;http://www.slideshare.net/notjosh/going-mobile-tip-tricks-and-tools-for-building-mobile-webapps-presentation?type=powerpoint&quot; title=&quot;Going mobile - tip, tricks and tools for building mobile web-apps&quot;&gt;Going mobile - tip, tricks and tools for building mobile web-apps&lt;/a&gt;&lt;object style=&quot;margin:0px&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://static.slideshare.net/swf/ssplayer2.swf?doc=200812-osdc-1228359071156676-9&amp;stripped_title=going-mobile-tip-tricks-and-tools-for-building-mobile-webapps-presentation&quot; /&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;/&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;/&gt;&lt;embed src=&quot;http://static.slideshare.net/swf/ssplayer2.swf?doc=200812-osdc-1228359071156676-9&amp;stripped_title=going-mobile-tip-tricks-and-tools-for-building-mobile-webapps-presentation&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style=&quot;font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;&quot;&gt;View SlideShare &lt;a style=&quot;text-decoration:underline;&quot; href=&quot;http://www.slideshare.net/notjosh/going-mobile-tip-tricks-and-tools-for-building-mobile-webapps-presentation?type=powerpoint&quot; title=&quot;View Going mobile - tip, tricks and tools for building mobile web-apps on SlideShare&quot;&gt;presentation&lt;/a&gt; or &lt;a style=&quot;text-decoration:underline;&quot; href=&quot;http://www.slideshare.net/upload?type=powerpoint&quot;&gt;Upload&lt;/a&gt; your own. (tags: &lt;a style=&quot;text-decoration:underline;&quot; href=&quot;http://slideshare.net/tag/mobile&quot;&gt;mobile&lt;/a&gt; &lt;a style=&quot;text-decoration:underline;&quot; href=&quot;http://slideshare.net/tag/osdc&quot;&gt;osdc&lt;/a&gt;)&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Get in touch if there&#039;s anything that doesn&#039;t make sense! 
    </content:encoded>

    <pubDate>Thu, 04 Dec 2008 15:13:15 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/65-guid.html</guid>
    
</item>
<item>
    <title>Ubiquity tab count</title>
    <link>http://notjosh.com/blog/archives/64-Ubiquity-tab-count.html</link>
    
    <comments>http://notjosh.com/blog/archives/64-Ubiquity-tab-count.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=64</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=64</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    I&#039;ve been looking for ages for an easy way to show the number of tabs I have open without needing an extension.&lt;br /&gt;
&lt;br /&gt;
(The problem is that Greasemonkey and such don&#039;t get access to the browser chrome, whereas extensions do)&lt;br /&gt;
&lt;br /&gt;
Well, I compromised by installing Ubiquity.&lt;br /&gt;
&lt;br /&gt;
Now an alt-space, &#039;tabs&#039;, will show &quot;n tabs in m windows&quot;.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the script:&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;textmate-source mac_classic&quot;&gt;&lt;span class=&quot;source source_js&quot;&gt;CmdUtils&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;CreateCommand&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  name: &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;tabs&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  description: &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;Count the number of tabs and windows you have open&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  icon: &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;http://www.spreadfirefox.com/files/spreadfirefox_RCS_favicon.png&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  author: &lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;{&lt;/span&gt; name: &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;Joshua May&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;, &lt;/span&gt;email: &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;notjosh@gmail.com&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  homepage: &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;http://notjosh.com/&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;meta meta_function meta_function_json meta_function_json_js&quot;&gt;&lt;span class=&quot;entity entity_name entity_name_function entity_name_function_js&quot;&gt;execute&lt;/span&gt;: &lt;span class=&quot;storage storage_type storage_type_function storage_type_function_js&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_js&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_end punctuation_definition_parameters_end_js&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;storage storage_type storage_type_js&quot;&gt;var&lt;/span&gt; wm &lt;span class=&quot;keyword keyword_operator keyword_operator_js&quot;&gt;=&lt;/span&gt; Components&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;support support_constant support_constant_js&quot;&gt;classes&lt;/span&gt;&lt;span class=&quot;meta meta_brace meta_brace_square meta_brace_square_js&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;@mozilla.org/appshell/window-mediator;1&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_brace meta_brace_square meta_brace_square_js&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;getService&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;(&lt;/span&gt;Components&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;interfaces&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;nsIWindowMediator&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;storage storage_type storage_type_js&quot;&gt;var&lt;/span&gt; counts &lt;span class=&quot;keyword keyword_operator keyword_operator_js&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;variable variable_language variable_language_js&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;_count&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;(&lt;/span&gt;wm&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class=&quot;storage storage_type storage_type_js&quot;&gt;var&lt;/span&gt; messageTemplate &lt;span class=&quot;keyword keyword_operator keyword_operator_js&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;${tabs} tab${tabPlural} open in ${windows} window${windowPlural}&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    displayMessage&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;(&lt;/span&gt;CmdUtils&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;renderTemplate&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;(&lt;/span&gt;messageTemplate&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;tabs&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;: counts&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;tab&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;windows&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;: counts&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;support support_class support_class_js&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;tabPlural&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;: &lt;span class=&quot;constant constant_numeric constant_numeric_js&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_js&quot;&gt;!=&lt;/span&gt; counts&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;tab ? &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;s&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; : &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;windowPlural&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;: &lt;span class=&quot;constant constant_numeric constant_numeric_js&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_js&quot;&gt;!=&lt;/span&gt; counts&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;support support_class support_class_js&quot;&gt;window&lt;/span&gt; ? &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;s&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; : &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;meta meta_function meta_function_json meta_function_json_js&quot;&gt;&lt;span class=&quot;entity entity_name entity_name_function entity_name_function_js&quot;&gt;_count&lt;/span&gt;: &lt;span class=&quot;storage storage_type storage_type_function storage_type_function_js&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_js&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;variable variable_parameter variable_parameter_function variable_parameter_function_js&quot;&gt;wm&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_end punctuation_definition_parameters_end_js&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;storage storage_type storage_type_js&quot;&gt;var&lt;/span&gt; windowIterator &lt;span class=&quot;keyword keyword_operator keyword_operator_js&quot;&gt;=&lt;/span&gt; wm&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;getEnumerator&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;navigator:browser&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class=&quot;storage storage_type storage_type_js&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;support support_class support_class_js&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;storage storage_type storage_type_js&quot;&gt;var&lt;/span&gt; counts &lt;span class=&quot;keyword keyword_operator keyword_operator_js&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;support support_class support_class_js&quot;&gt;window&lt;/span&gt;: &lt;span class=&quot;constant constant_numeric constant_numeric_js&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js&quot;&gt;,&lt;/span&gt;&lt;br /&gt;      tab: &lt;span class=&quot;constant constant_numeric constant_numeric_js&quot;&gt;0&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class=&quot;keyword keyword_control keyword_control_js&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;(&lt;/span&gt;windowIterator&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;hasMoreElements&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;())&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span class=&quot;support support_class support_class_js&quot;&gt;window&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_js&quot;&gt;=&lt;/span&gt; windowIterator&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;getNext&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;      counts&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;support support_class support_class_js&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_js&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;      counts&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;tab &lt;span class=&quot;keyword keyword_operator keyword_operator_js&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;support support_class support_class_js&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;support support_class support_class_js&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;support support_function support_function_dom support_function_dom_js&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_js&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js&quot;&gt;&#039;&lt;/span&gt;content&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;mTabs&lt;span class=&quot;meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;support support_constant support_constant_js&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class=&quot;keyword keyword_control keyword_control_js&quot;&gt;return&lt;/span&gt; counts&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;meta meta_brace meta_brace_curly meta_brace_curly_js&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;meta meta_brace meta_brace_round meta_brace_round_js&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt; 
    </content:encoded>

    <pubDate>Fri, 07 Nov 2008 18:23:49 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/64-guid.html</guid>
    
</item>
<item>
    <title>Thunderbird 3 (Shredder) and Growl Notifications</title>
    <link>http://notjosh.com/blog/archives/62-Thunderbird-3-Shredder-and-Growl-Notifications.html</link>
    
    <comments>http://notjosh.com/blog/archives/62-Thunderbird-3-Shredder-and-Growl-Notifications.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=62</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=62</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    Since formatting a couple of weeks back, I thought I&#039;d give &lt;a href=&quot;http://www.mozillamessaging.com/en-US/thunderbird/3.0a3/&quot;&gt;Shredder Alpha 3&lt;/a&gt; a go (Shredder is just the codename for Thunderbird 3).&lt;br /&gt;
&lt;br /&gt;
As far as functionality goes, it&#039;s pretty nifty. Having tabbed inboxes is nifty, but there&#039;s no tabbed compose window, which is my only real gripe.&lt;br /&gt;
&lt;br /&gt;
Anyway, I wanted &lt;a href=&quot;http://growl.info/&quot;&gt;Growl&lt;/a&gt; notifications of new messages, so I installed the &lt;a href=&quot;https://addons.mozilla.org/en-US/thunderbird/addon/4634&quot;&gt;Growl Notifications&lt;/a&gt; add-on (which has served me well in past, and is in a sense the &#039;official&#039; Growl add-on).&lt;br /&gt;
&lt;br /&gt;
Well, it didn&#039;t work.&lt;br /&gt;
&lt;br /&gt;
I got my debug on today, and saw that it was whinging about &lt;code&gt;grINotificationsList&lt;/code&gt; not being defined. I dug through a lot of code, and ventured deep into Obj-C land, which was the second time in two days (two different projects), and mighty unfamiliar. Eventually I stumbled on &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=308552&quot;&gt;this Mozilla bug&lt;/a&gt; to try and find the XPCOM change between 1.8 and 1.9 to patch the extension.&lt;br /&gt;
&lt;br /&gt;
Long story short, Growl is now built into Thunderbird. You don&#039;t need an extension. Although, I needed to pull a nightly build to have it working. But that might have also been a conflict with the broken plugin.&lt;br /&gt;
&lt;br /&gt;
I&#039;m not big on the format (now it says &quot;[emailaddress] has [n] new message(s)&quot;, instead of the subject/intro line that the old add-on had). I&#039;m going to see if I can listen to an event and call it myself with my own format, but it seems the default response is hard coded in your platform&#039;s &lt;code&gt;FillToolTipInfo&lt;/code&gt; method. Hm. At the very least, you can change the &lt;code&gt;(new)BiffNotification_message(s)&lt;/code&gt; in &lt;code&gt;messenger.properties&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
I feel a bit unaccomplished now though - I&#039;ve spent all this time figuring out what&#039;s going on, and now I&#039;ve got nothing to show for it - no patch, nothing!&lt;br /&gt;
&lt;br /&gt;
*finds something to work on with deliverables* 
    </content:encoded>

    <pubDate>Thu, 06 Nov 2008 21:34:48 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/62-guid.html</guid>
    
</item>
<item>
    <title>No swap? No worries!</title>
    <link>http://notjosh.com/blog/archives/61-No-swap-No-worries!.html</link>
    
    <comments>http://notjosh.com/blog/archives/61-No-swap-No-worries!.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=61</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=61</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    Well, tonight I solved an issue that&#039;s been bugging me a while. I now have a swap partition which is actually being used - already helping a lot!&lt;br /&gt;
&lt;br /&gt;
The background: I&#039;m hosting my site(s) on &lt;a href=&quot;http://slicehost.com/&quot;&gt;Slicehost&lt;/a&gt; on a 256mb VPS. I also run screen with weechat, which over time can consume an assload of memory. So every now and again, processes are just dying because weechat is taking over, and for some bizarre reason, I&#039;ve got no swap.&lt;br /&gt;
&lt;br /&gt;
Well, tonight I reclaimed my swap.&lt;br /&gt;
&lt;br /&gt;
I initially thought I just never had swap to begin with - I&#039;m a pretty early Slicehost adopter (two years now!), so I just thought early in the piece there were hiccups. Turns out an Ubuntu update somehow nuked fstab, and I&#039;d never noticed.&lt;br /&gt;
&lt;br /&gt;
The fix was pretty simple, I just found the new UUID by running `ls /dev/disk/by-uuid/ -al`, and updated fstab. `free -m` was still reporting no swap, though, and I didn&#039;t really want to reboot. Turns out `sudo swapon /dev/sda2` activated the swap, and suddenly it was all working perfectly.&lt;br /&gt;
&lt;br /&gt;
So there you go. Swaptastic!&lt;br /&gt;
&lt;br /&gt;
(A couple of hours in and it&#039;s already making massive difference. Why didn&#039;t I do this a year ago?) 
    </content:encoded>

    <pubDate>Mon, 03 Nov 2008 01:41:34 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/61-guid.html</guid>
    
</item>
<item>
    <title>Who needs a job anyway?</title>
    <link>http://notjosh.com/blog/archives/60-Who-needs-a-job-anyway.html</link>
    
    <comments>http://notjosh.com/blog/archives/60-Who-needs-a-job-anyway.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=60</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=60</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    So, I&#039;m unemployed.&lt;br /&gt;
&lt;br /&gt;
Economic crisis and all that bollocks. They didn&#039;t foresee any more investment funding coming in before they ran out of cash..and with no actual revenue model (and userbase), the writing was on the wall. I found out on Thursday, and by Friday I&#039;d handed in my laptop and it was all over.&lt;br /&gt;
&lt;br /&gt;
There was a 50% &quot;downsizing&quot;, which basically took them back to the team they had before the more recent of us started 9 months ago.&lt;br /&gt;
&lt;br /&gt;
It was a pretty fun ride, and I learnt a lot of (useful) things. And as far as I know, I built the world&#039;s most secure and awesome OpenID provider ever. But now they don&#039;t have anyone to maintain it, I&#039;m guessing it won&#039;t really ever see the light of day, which is a real pity - means I&#039;ve got virtually nothing to show for my last few months at work. Sigh. I&#039;ve gotta check my employment contracts and see if I&#039;ll be able to salvage it some other form..don&#039;t think it&#039;ll work though, really.&lt;br /&gt;
&lt;br /&gt;
It&#039;s a bit of a prick of a time to be looking for work at the moment, too, given that Christmas is coming up, as well as OSDC, and two weddings in Canberra.&lt;br /&gt;
&lt;br /&gt;
So, at least until the new year I&#039;ll be looking for some contract/freelance work to tide me over. Give me a yell if you&#039;ve got anything for me, yeah?&lt;br /&gt;
&lt;br /&gt;
In the meantime, I&#039;m gonna spend some days getting some sadly neglected symfony plugins back up to scratch (as well as release a few new ones). Gotta keep busy, gotta keep goin&#039; forward. 
    </content:encoded>

    <pubDate>Tue, 28 Oct 2008 20:38:01 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/60-guid.html</guid>
    
</item>
<item>
    <title>Lyrics: Off Minor - Some Blood</title>
    <link>http://notjosh.com/blog/archives/58-Lyrics-Off-Minor-Some-Blood.html</link>
    
    <comments>http://notjosh.com/blog/archives/58-Lyrics-Off-Minor-Some-Blood.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=58</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=58</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    I scoured the &#039;net for ages looking for these lyrics. No joy. Then the sheet they were printed on randomly appeared again..so to save the hassle next time, I present Off Minor - Some Blood.&lt;br /&gt;
&lt;br /&gt;
And, urm, if you&#039;re into Off Minor &lt;a href=&quot;http://www.paramnesiarecords.com/offminor/&quot;&gt;flip some beans on the tracks (available on vinyl or download)&lt;/a&gt;. And &lt;em&gt;think&lt;/em&gt; about the words, don&#039;t just remember them to be shouted next time you see them, yeah?&lt;br /&gt;
&lt;br /&gt;
Anyway.. the lyrics. This is how they&#039;re printed. They don&#039;t seem to match word-for-word with what&#039;s sung, so, figure it out yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Neologist&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Neologist says:&lt;br /&gt;
&quot;Whereas words once served a sentence now are sentenced,&lt;br /&gt;
serving our every agenda.&quot;&lt;br /&gt;
We pour poison&lt;br /&gt;
into the people&#039;s ear and yet they&#039;re still eager&lt;br /&gt;
to tip their heads.&lt;br /&gt;
And should you date search for what truth is&lt;br /&gt;
A twisted tongue will torture your thesis.&lt;br /&gt;
And should you say &#039;this is injustice&#039;&lt;br /&gt;
A cunning mind will redefine what is is&lt;br /&gt;
This is not torture&lt;br /&gt;
This is not surveillance&lt;br /&gt;
This is not injustice&lt;br /&gt;
This is poetic license permitted by a nations silence&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Some Blood&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
this fluid is confined to single file lines.&lt;br /&gt;
this life is allogenic&lt;br /&gt;
and it ruddy hues remind me that&lt;br /&gt;
you&#039;re in me but not of me,&lt;br /&gt;
from origins unknown.&lt;br /&gt;
in me but not of me,&lt;br /&gt;
your gift in anonymity draws&lt;br /&gt;
questions of identity.&lt;br /&gt;
the heterogeneity of me&lt;br /&gt;
and you, what separates us now becomes obscure.&lt;br /&gt;
diffusely lost in me, you still endure.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Everything Explicit&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
what&#039;s best left unsaid?&lt;br /&gt;
a speaker spend, a listener left with regrets in his stead&lt;br /&gt;
in a life of loss, silence can cost you more than you expect.&lt;br /&gt;
held tongues relate a bitter taste when prone to reminisce.&lt;br /&gt;
anamnestic, recipient absent, the circuit&#039;s dead&lt;br /&gt;
we live these linear lives unidirectional, towards an inevitable end&lt;br /&gt;
we must make everything explicit&lt;br /&gt;
that&#039;s how we left it: unsaid.&lt;br /&gt;
now i&#039;m at a loss for words&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;To An Ex&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&quot;Oh, sweetest piece of me&quot; you say &quot;I&#039;ve found your place in me has grown too small to fit and still grows smaller everyday&quot;&lt;br /&gt;
The me in you has changed, the you in me still stays the same, each has no bearing on the other, so we could say of one another.&lt;br /&gt;
So sweetest piece of me, it seems we&#039;ll take each other piece by piece apart and place each in the safest place within our holding hearts.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;No Conversationalist I&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Regarding allegations that I am an extra-terrestrial,&lt;br /&gt;
she stated, somewhat sadly, &quot;Unfortunately it&#039;s feasible.&quot;&lt;br /&gt;
I started to say &quot;What can I say?&quot; instead stopped and said no more&lt;br /&gt;
For I was born brain-backwards with words awkward,&lt;br /&gt;
Ending dialogues at forewords&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Practice Absence&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
This is prophylaxis, a practiced absence, a safer distance.&lt;br /&gt;
He is a fine clinician to diagnose this, a sound decision.&lt;br /&gt;
This is a family practice, it&#039;s anesthetic, it&#039;s nonreactive.&lt;br /&gt;
This is a termination, a fine resemblance, but no relation.&lt;br /&gt;
At the end of all things. 
    </content:encoded>

    <pubDate>Mon, 27 Oct 2008 19:56:24 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/58-guid.html</guid>
    
</item>
<item>
    <title>I'm living a little better</title>
    <link>http://notjosh.com/blog/archives/57-Im-living-a-little-better.html</link>
    
    <comments>http://notjosh.com/blog/archives/57-Im-living-a-little-better.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=57</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=57</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    I&#039;ve been meaning to blog about a lot of things, but haven&#039;t made myself the time recently - weekends have been spent at the snow, and quite literally through winter days are shorter. Well, the sun&#039;s setting later now, and this weekend marks the first weekend toward summer where I&#039;m not going to the snow.&lt;br /&gt;
&lt;br /&gt;
This year has seen a fair chunk of positive change in my life, which I&#039;m rather pleased with. I&#039;m going to try and document it, so I can refer back to it if I start to slump.&lt;br /&gt;
&lt;br /&gt;
I suppose I&#039;ve been pondering for a while how to be less wasteful in general, and live my life a little more efficiently. To my uneducated mind, that simply meant locking myself indoors and never doing anything &#039;fun&#039;. Not a very healthy lifestyle, no no.&lt;br /&gt;
&lt;br /&gt;
So, back in May, after going to the markets and stocking right up on meat, Danielle and myself decided to go vegetarian. Not because &#039;meat is murder&#039;, but more because &#039;meat is inefficient&#039; more than anything. Granted, Australia has a lot of land for grazing, it still takes a lot of effort to get from there to here. Hell, even cooking meat is more effort.&lt;br /&gt;
&lt;br /&gt;
To be perfectly honest, though, even if I was still eating meat, going vegetarian has been an awesome joyride - trying new foods, having to come up with new ideas to keep it interesting, etc. You know, throwing yourself in the deep-end and trying to stay afloat. So far, so good. There&#039;s a lot of meat still in the freezer that the puppies are slowly working through, though. Soon!&lt;br /&gt;
&lt;br /&gt;
Hrm, so after decided less meat = good came the transition to eating locally. Again, this wasn&#039;t really motivated by the &quot;right&quot; reason - &#039;local is efficient&#039; - but rather, it was more that the Preston markets were over crowded with smelly people, smokers, and people always in a rush. So we rocked up bright and early to the farmer&#039;s markets at the Collingwood Children&#039;s Farm and blew a whole truckload of cash. I mean, it wasn&#039;t any cheaper, but the atmosphere was nicer with less smokers and more cute puppies. And, you know, better food. And lots of it. Apples, chocolate, eggs, strawberries, pumpkins. All in season, all fresh and all local. It was a delight to feast on!&lt;br /&gt;
&lt;br /&gt;
What else? I don&#039;t think I&#039;ve bought bread in two months now (the bread machine is getting a right workout!). In fact, the oven is getting a workout more now, too, as we make more things from scratch. I made the best cupcakes I&#039;ve ever made last night, without a single packet! And we&#039;ve made mousse, sticky date pudding, chocolate brioche, hot cross buns and more in just the last few weeks. All from scratch. (Mostly) all delicious.&lt;br /&gt;
&lt;br /&gt;
OH! Making your own pasta from scratch - I highly recommend it! Since buying the pasta roller on eBay, it&#039;s ridiculously easy, too (rolling and cutting it was a pain in the bum!)&lt;br /&gt;
&lt;br /&gt;
I&#039;m drinking &quot;organic&quot; milk now, instead of the generic Pura stuff. Which is distinctly more expensive (I paid $5.25 for two litres at the supermarket, and the checkout chick gasped and exclaimed &quot;wow, this is expensive!&quot;), but it seems to be more &#039;authentic&#039; in a sense. There&#039;s cream around the top, and we discovered yesterday after microwaving it, that there were little fatty bubbles on top from the melted butter. It was gross at first, but smiles crossed our faces when we thought about it a little more rationally.&lt;br /&gt;
&lt;br /&gt;
In perspective, though, I think $5.25 for two litres of milk is rather cheap. I pay more than that for a daily ticket to sit on a train (which, incidentally, gets me to work slower than riding). I can think of many things worse than milk to spend my money on. Hell, $5.25 for a packet of cigarettes (cigarettes! Eugh!) is cheaper than that, and infinitely less useful.&lt;br /&gt;
&lt;br /&gt;
We&#039;ve just started buying bath milk, too. To drink. Despite the warning labels saying &quot;NOT FOR HUMAN CONSUMPTION&quot; and all that. Apparently though, some dairy farm was shut down or fined tens of thousands of dollars from a staff member jokingly suggesting something along the lines of &quot;that looks good enough to drink!&quot; (that&#039;s right, not even suggesting something *should* drink it), so they&#039;re never going to tell you to drink it. So what is it? It&#039;s just raw milk. Unpasteurised. Not heated first. Capiche?&lt;br /&gt;
&lt;br /&gt;
So, the verdict on raw milk? Well, it&#039;s milk. Tastes pretty much like milk. I guess it&#039;s milkier milk than normal (just like the strawberries from the Farmer&#039;s markets are strawberrier than normal strawberries). It doesn&#039;t seem to leave you with a lingering aftertaste though, which is the worst part of milk. It&#039;s $6 for two litres though. More expensive, but not by much..&lt;br /&gt;
&lt;br /&gt;
I&#039;m seemingly more opposed to takeaway food of late. Occasionally we&#039;ll fetch some hot chips from the local takeaway, but that&#039;s generally the extent of it. Or if we&#039;re eating out, we&#039;ve found some unreal vegetarian restaurants around the place that really appeal to what we&#039;re into. Unlicensed, no EFTPOS, but amazingly delicious food. It&#039;s great.&lt;br /&gt;
&lt;br /&gt;
There&#039;s the (somewhat sad looking) vege patch in the backyard too. And the worms. They&#039;re nice. Yum!&lt;br /&gt;
&lt;br /&gt;
I&#039;m still a long way from I suppose a model whole-food eater or whatever, but I&#039;m sincerely enjoying the flavours and the time spent preparing good quality food - even if it&#039;s a simple dish, it&#039;s so much more satisfying when the food has flavour that hasn&#039;t come from a bottle..&lt;br /&gt;
&lt;br /&gt;
I suppose I&#039;ll write more in somewhat specific detail in future - it&#039;s just a bit of a braindump since it&#039;s been so long. Stay tuned. All two of you. 
    </content:encoded>

    <pubDate>Fri, 05 Sep 2008 22:23:14 +1000</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/57-guid.html</guid>
    
</item>
<item>
    <title>Google Hosting Popular JS Libraries</title>
    <link>http://notjosh.com/blog/archives/56-Google-Hosting-Popular-JS-Libraries.html</link>
    
    <comments>http://notjosh.com/blog/archives/56-Google-Hosting-Popular-JS-Libraries.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=56</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=56</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    I saw this randomly this morning, but I can&#039;t find the source.&lt;br /&gt;
&lt;br /&gt;
In any case, Google are now hosting many popular JavaScript libraries (jQuery, prototype/script.aculo.us, MooTools, dojo) on their own servers - cached, compressed and minified, ready to consume.&lt;br /&gt;
&lt;br /&gt;
It&#039;s as simple as you expect:&lt;br /&gt;
&lt;code&gt;&amp;lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
(though, there&#039;s a longer, &quot;better&quot; way to do it if you&#039;re that way inclined, also)&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://code.google.com/apis/ajaxlibs/&quot;&gt;See it here&lt;/a&gt; and the &lt;a href=&quot;http://googleajaxsearchapi.blogspot.com/2008/05/speed-up-access-to-your-favorite.html&quot;&gt;announcement&lt;/a&gt; at &lt;a href=&quot;http://googleajaxsearchapi.blogspot.com/&quot;&gt;AJAX Search API Blog&lt;/a&gt; 
    </content:encoded>

    <pubDate>Wed, 28 May 2008 15:42:44 +1000</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/56-guid.html</guid>
    
</item>
<item>
    <title>sfPropelParanoidBehavior vs Propel 1.3</title>
    <link>http://notjosh.com/blog/archives/55-sfPropelParanoidBehavior-vs-Propel-1.3.html</link>
    
    <comments>http://notjosh.com/blog/archives/55-sfPropelParanoidBehavior-vs-Propel-1.3.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=55</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=55</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    Just a quick one, mostly for my sake.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re trying to use &lt;code&gt;sfPropelParanoidBehavior&lt;/code&gt; with (recent? Since r474 (see &lt;a href=&quot;http://propel.phpdb.org/trac/changeset/474&quot;&gt;http://propel.phpdb.org/trac/changeset/474&lt;/a&gt;)) Propel 1.3, you&#039;ll notice the selects aren&#039;t filtering out the deleted items.&lt;br /&gt;
&lt;br /&gt;
Easy fix!&lt;br /&gt;
&lt;br /&gt;
In &lt;code&gt;plugins/sfPropelParanoidBehavior/config/config.php&lt;/code&gt;, change (on line 9) &lt;code&gt;Peer:doSelectRS&lt;/code&gt; to read &lt;code&gt;Peer:doSelectStmt&lt;/code&gt;. Leave the &lt;code&gt;doSelectRS&lt;/code&gt; in the array, that&#039;s the callback in the plugin which is fine. 
    </content:encoded>

    <pubDate>Fri, 14 Mar 2008 15:42:46 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/55-guid.html</guid>
    
</item>
<item>
    <title>Custom Caching in symfony</title>
    <link>http://notjosh.com/blog/archives/54-Custom-Caching-in-symfony.html</link>
    
    <comments>http://notjosh.com/blog/archives/54-Custom-Caching-in-symfony.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=54</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=54</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    Just quickly, because it&#039;s handy and simple.&lt;br /&gt;
&lt;br /&gt;
I&#039;m building a page that&#039;s reading a twitter-feed to display on the front page. I don&#039;t want to be hitting twitter on every page hit though (obviously), so we need to cache the data. Could it be any simpler? (Thanks symfony! *cheesy wink*)&lt;br /&gt;
&lt;br /&gt;
Let&#039;s dive into the code:&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;textmate-source mac_classic&quot;&gt;&lt;span class=&quot;source source_php&quot;&gt;&lt;span class=&quot;source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_embedded punctuation_definition_embedded_begin punctuation_definition_embedded_begin_php&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;constant constant_other constant_other_php&quot;&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function meta_function_php&quot;&gt;&lt;span class=&quot;storage storage_modifier storage_modifier_php&quot;&gt;public &lt;/span&gt;&lt;span class=&quot;storage storage_type storage_type_function storage_type_function_php&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;entity entity_name entity_name_function entity_name_function_php&quot;&gt;executeIndex&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_php&quot;&gt;(&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;cache&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfFileCache&lt;/span&gt;(&lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php&quot;&gt;cache_dir&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php&quot;&gt;/tmp/twitter&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span class=&quot;keyword keyword_control keyword_control_php&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;keyword keyword_operator keyword_operator_logical keyword_operator_logical_php&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;cache&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;has&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php&quot;&gt;tweet&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;))&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;{&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;status&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;TwitterFeed&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_static meta_function-call_static_php&quot;&gt;getLatestTweet&lt;/span&gt;(&lt;span class=&quot;support support_class support_class_php&quot;&gt;sfConfig&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_static meta_function-call_static_php&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php&quot;&gt;app_twitter_user_id&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;))&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;cache&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;set&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php&quot;&gt;tweet&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;status&lt;/span&gt;, &lt;span class=&quot;constant constant_numeric constant_numeric_php&quot;&gt;600&lt;/span&gt;)&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php&quot;&gt;;&lt;/span&gt;     &lt;span class=&quot;comment comment_line comment_line_double-slash comment_line_double-slash_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_php&quot;&gt;//&lt;/span&gt; 10 mins cache expiry&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;}&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;variable variable_other variable_other_property variable_other_property_php&quot;&gt;status&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;cache&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php&quot;&gt;tweet&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;)&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Holy crap, that was too easy!&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
That said, it&#039;d be stupid if it were any harder.&lt;br /&gt;
&lt;br /&gt;
Now, a few tweaks you could do. You could, instead of caching to &lt;code&gt;/tmp&lt;/code&gt;, you could cache to &lt;code&gt;sf_cache_dir&lt;/code&gt;, so that a &lt;code&gt;symfony cc&lt;/code&gt; would also clear that cached data. Could be handy, but might not be what you want.&lt;br /&gt;
&lt;br /&gt;
I suppose if you weren&#039;t so lazy, you&#039;d pull those out into &lt;code&gt;app.yml&lt;/code&gt; variables. I would, if I were you! It&#039;s a pity I&#039;m lazy, really. 
    </content:encoded>

    <pubDate>Thu, 21 Feb 2008 15:40:34 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/54-guid.html</guid>
    
</item>
<item>
    <title>Symfony 1.1 Form Templating</title>
    <link>http://notjosh.com/blog/archives/53-Symfony-1.1-Form-Templating.html</link>
    
    <comments>http://notjosh.com/blog/archives/53-Symfony-1.1-Form-Templating.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=53</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=53</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    So, I&#039;m tired of how the forms look in symfony 1.1. I mean c&#039;mon, tables? We can do better than that.&lt;br /&gt;
&lt;br /&gt;
Note: we can do better than my solution too, I&#039;m sure, but this is way better than tables!&lt;br /&gt;
&lt;br /&gt;
So inside of &lt;code&gt;/lib/widget&lt;/code&gt;, I&#039;ve created &lt;code&gt;sfWidgetFormSchemaFormatterJosh.class.php&lt;/code&gt; which looks a little like:&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;textmate-source mac_classic&quot;&gt;&lt;span class=&quot;source source_php&quot;&gt;&lt;span class=&quot;source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html&quot;&gt;&lt;span class=&quot;meta meta_class meta_class_php&quot;&gt;&lt;span class=&quot;storage storage_type storage_type_class storage_type_class_php&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;entity entity_name entity_name_type entity_name_type_class entity_name_type_class_php&quot;&gt;sfWidgetFormSchemaFormatterPulse&lt;/span&gt; &lt;span class=&quot;storage storage_modifier storage_modifier_extends storage_modifier_extends_php&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;entity entity_other entity_other_inherited-class entity_other_inherited-class_php&quot;&gt;sfWidgetFormSchemaFormatter&lt;/span&gt;&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&lt;span class=&quot;storage storage_modifier storage_modifier_php&quot;&gt;protected&lt;/span&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;rowFormat&lt;/span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;&amp;#160;&amp;#160;=&lt;/span&gt; &lt;span class=&quot;string string_quoted string_quoted_double string_quoted_double_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php&quot;&gt;&amp;lt;div class=&lt;span class=&quot;constant constant_character constant_character_escape constant_character_escape_php&quot;&gt;\&quot;&lt;/span&gt;form-row&lt;span class=&quot;constant constant_character constant_character_escape constant_character_escape_php&quot;&gt;\&quot;&lt;/span&gt;&amp;gt;&lt;span class=&quot;constant constant_character constant_character_escape constant_character_escape_php&quot;&gt;\n&lt;/span&gt;  %error%%label%&lt;span class=&quot;constant constant_character constant_character_escape constant_character_escape_php&quot;&gt;\n&lt;/span&gt;  %field%%help%&lt;span class=&quot;constant constant_character constant_character_escape constant_character_escape_php&quot;&gt;\n&lt;/span&gt;%hidden_fields%&lt;span class=&quot;constant constant_character constant_character_escape constant_character_escape_php&quot;&gt;\n&lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;,&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;errorRowFormat&lt;/span&gt;  &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;string string_quoted string_quoted_double string_quoted_double_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php&quot;&gt;&amp;lt;div class=&lt;span class=&quot;constant constant_character constant_character_escape constant_character_escape_php&quot;&gt;\&quot;&lt;/span&gt;error&lt;span class=&quot;constant constant_character constant_character_escape constant_character_escape_php&quot;&gt;\&quot;&lt;/span&gt;&amp;gt;&lt;span class=&quot;constant constant_character constant_character_escape constant_character_escape_php&quot;&gt;\n&lt;/span&gt;%errors%&amp;lt;/div&amp;gt;&lt;span class=&quot;constant constant_character constant_character_escape constant_character_escape_php&quot;&gt;\n&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
And, from there we need to tell our form to use our own formatter, so in your &lt;code&gt;sfForm&lt;/code&gt; (child) class, in either &lt;code&gt;configure()&lt;/code&gt; or &lt;code&gt;setup()&lt;/code&gt; (I use &lt;code&gt;setup()&lt;/code&gt; - I don&#039;t know if there is a difference, really. Is there? Anyone?), add the following line:&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;textmate-source mac_classic&quot;&gt;&lt;span class=&quot;source source_php&quot;&gt;&lt;span class=&quot;source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html&quot;&gt;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getWidgetSchema&lt;/span&gt;()&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;setFormFormatterName&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php&quot;&gt;pulse&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;)&lt;span class=&quot;punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
And that&#039;s it! Quite simple really. (When the form is rendered, symfony will look for &lt;code&gt;$class = &#039;sfWidgetFormSchemaFormatter&#039; . ucfirst($name);&lt;/code&gt; (where $name is &#039;josh&#039;, or whatever you called your formatter), and does the rendering using that class!)&lt;br /&gt;
&lt;br /&gt;
For full customisation, have a look in &lt;code&gt;sfWidgetFormSchemaFormatter&lt;/code&gt;, and look at the &lt;code&gt;protected&lt;/code&gt; variables at the top. They&#039;re what you have to play with.&lt;br /&gt;
&lt;br /&gt;
For examples of other implementations, symfony have their own formatters: &lt;code&gt;sfWidgetFormSchemaFormatterTable&lt;/code&gt; (default) and &lt;code&gt;sfWidgetFormSchemaFormatterList&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
Good luck! 
    </content:encoded>

    <pubDate>Sat, 09 Feb 2008 04:08:43 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/53-guid.html</guid>
    
</item>
<item>
    <title>PEAR Bad! Phing Weirdness</title>
    <link>http://notjosh.com/blog/archives/52-PEAR-Bad!-Phing-Weirdness.html</link>
    
    <comments>http://notjosh.com/blog/archives/52-PEAR-Bad!-Phing-Weirdness.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=52</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=52</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    So I was just trying to deploy some demo code, and my server was whining at me. Bigtime.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;./symfony propel:build-all-load frontend&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Yielded the error:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;Fatal error: Declaration of SequentialTask::addTask() must be compatible with that of TaskContainer::addTask()&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The code I had deployed was &lt;em&gt;identical&lt;/em&gt; to my local code. The error message even identified the deployed code!&lt;br /&gt;
&lt;br /&gt;
Something was up.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:&lt;br /&gt;
=========================================&lt;br /&gt;
PACKAGE          VERSION STATE&lt;br /&gt;
Archive_Tar      1.3.2   stable&lt;br /&gt;
Console_Getopt   1.2.2   stable&lt;br /&gt;
PEAR             1.5.4   stable&lt;br /&gt;
Structures_Graph 1.0.2   stable&lt;br /&gt;
phing            2.1.1   stable&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Ah ha!&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;sudo pear uninstall phing&lt;br /&gt;
uninstall ok: channel://pear.php.net/phing-2.1.1&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Success!&lt;br /&gt;
&lt;br /&gt;
So there you go: PEAR bad, bundled libs good. 
    </content:encoded>

    <pubDate>Tue, 04 Dec 2007 22:29:43 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/52-guid.html</guid>
    
</item>
<item>
    <title>Getting symfony 1.1 Running</title>
    <link>http://notjosh.com/blog/archives/50-Getting-symfony-1.1-Running.html</link>
    
    <comments>http://notjosh.com/blog/archives/50-Getting-symfony-1.1-Running.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=50</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=50</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    I was just thinking, I wrote a blog entry about symfony 1.1, without any guide to getting symfony 1.1 up and running. If you&#039;re not sure what you&#039;re doing, &lt;strong&gt;don&#039;t do it&lt;/strong&gt;! Wait for the official release (or RC, etc) which will no doubt come with docs as well. You&#039;ll probably need them.&lt;br /&gt;
&lt;br /&gt;
Note: I don&#039;t know how well this will run on Windows. I think it should (from looking at &lt;code&gt;symfony.bat&lt;/code&gt;), but your mileage may vary. Cross your fingers, let&#039;s jump in!&lt;br /&gt;
&lt;br /&gt;
To get the code, I&#039;ve been pulling it down from SVN into a local lib directory. Though, there&#039;s one thing to think about before we go there.&lt;br /&gt;
&lt;br /&gt;
We need to decide which code to pull down. The most obvious option is to pull down the &lt;code&gt;trunk/&lt;/code&gt; folder, but I&#039;ve been having some sweet success with the &lt;code&gt;branches/dwhittle/&lt;/code&gt; folder. Among other things, the &lt;code&gt;dwhittle&lt;/code&gt; branch has Propel 1.3 support, which I&#039;m clearly an avid fan of (after writing sfPropel13Plugin). It&#039;s kept fairly well up to date, so it seems fine.&lt;br /&gt;
&lt;br /&gt;
So, you&#039;ve chosen a branch, let&#039;s pull down the code:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Navigate to your local repo: &lt;code&gt;cd /&amp;lt;path to local repo (I have it in /Library somewhere)&amp;gt;/&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Checkout the code: &lt;code&gt;svn co http://svn.symfony-project.com/branches/dwhittle/ sf11&lt;/code&gt; (or use &lt;code&gt;/trunk&lt;/code&gt; if you want to stick to trunk.)&lt;/li&gt;&lt;li&gt;(Optional, for convenience. Or else skip ahead to the third last step) Copy the &lt;code&gt;symfony&lt;/code&gt; script somewhere useful: &lt;code&gt;cp sf11/data/bin/symfony ~/util&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Edit the &lt;code&gt;symfony&lt;/code&gt; script, and add in your lib dirs: (lines 44 and 45, under the PEAR comment) &lt;code&gt;$sf_symfony_lib_dir = &#039;/&amp;lt;path to local repo&amp;gt;/sf11/lib&#039;; $sf_symfony_data_dir = &#039;/&amp;lt;path to local repo&amp;gt;/sf11/data&#039; ;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Run the script! &lt;code&gt;~/util/symfony&lt;/code&gt; - there should the list of Pake tasks&lt;/li&gt;&lt;li&gt;Create a new project folder, and &lt;code&gt;cd&lt;/code&gt; into it&lt;/li&gt;&lt;li&gt;Generate a project! &lt;code&gt;~/util/symfony generate:project &amp;lt;project name&amp;gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;You should now be able to run &lt;code&gt;symfony&lt;/code&gt; and it&#039;ll automatically refer to your symfony 1.1 Pake tasks. Success!&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
From here, you can do the same old tricks, like symlink&#039;ing/svn:externals&#039;ing the symfony libs into &lt;code&gt;lib/vendor/symfony/&lt;/code&gt;, and modify &lt;code&gt;config/config.php&lt;/code&gt; so you&#039;re not referring to the global lib. But that&#039;s entirely optional (I only do it because my IDE likes it).&lt;br /&gt;
&lt;br /&gt;
And for you Windows users, if the steps above broke for you, try including the &lt;code&gt;symfony.bat&lt;/code&gt; into your util directory, so that Windows has something to execute. It should work, though!&lt;br /&gt;
&lt;br /&gt;
Best of luck! 
    </content:encoded>

    <pubDate>Tue, 27 Nov 2007 21:45:51 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/50-guid.html</guid>
    
</item>
<item>
    <title>Symfony 1.1 Forms and Validation</title>
    <link>http://notjosh.com/blog/archives/47-Symfony-1.1-Forms-and-Validation.html</link>
    
    <comments>http://notjosh.com/blog/archives/47-Symfony-1.1-Forms-and-Validation.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=47</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=47</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    Okay, so you want the quick rundown of how forms and validation work in symfony 1.1?&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;First, download the demo project - &lt;a href=&quot;http://notjosh.com/labs/sf11forms.zip&quot;&gt;http://notjosh.com/labs/sf11forms.zip&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Extract the project to somewhere on your http://localhost/ (the project should run as a sandbox project)&lt;/li&gt;&lt;li&gt;(Probably only necessary for *nix/Mac) On the command line, navigate to the directory of the project, and run &lt;code&gt;./symfony project:permissions&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Point your favourite browser to http://localhost/&amp;lt;your project path&amp;gt;/web/frontend_dev.php/&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll be presented with a pretty basic form, with some ridiculous validation rules. The scenario we&#039;re going for is that this is a user registration form. The validation rules are mostly just so you can see how flexible they are and how to use them.&lt;br /&gt;
&lt;br /&gt;
That&#039;s the quickstart. For an explanation of how it all works, read on!&lt;br /&gt;
&lt;br /&gt;
Okay, so let&#039;s have a look at the file structure of the project. It&#039;s very much what you&#039;re used to in symfony 1.0. Knowing that, let&#039;s head into some code.&lt;br /&gt;
&lt;br /&gt;
Open your favourite file-browser/IDE to /apps/frontend/modules/user.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;In our actions file, we have one action called &#039;register&#039;.&lt;/li&gt;&lt;li&gt;We have two templates - a form, and a page that will just echo the form values once a successful submission is received&lt;/li&gt;&lt;li&gt;In our module&#039;s &lt;code&gt;lib/&lt;/code&gt; directory, we have three folders, each with a single class in them. (Note: this is just my convention, you don&#039;t need to have the classes in the folders)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s start with the things we&#039;re used to. Let&#039;s have a look in the action:&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;textmate-source mac_classic&quot;&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    1&lt;/span&gt; &lt;span class=&quot;source source_php&quot;&gt;&lt;span class=&quot;meta meta_function meta_function_php&quot;&gt;&lt;span class=&quot;storage storage_modifier storage_modifier_php&quot;&gt;public &lt;/span&gt;&lt;span class=&quot;storage storage_type storage_type_function storage_type_function_php&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;entity entity_name entity_name_function entity_name_function_php&quot;&gt;executeRegister&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_php&quot;&gt;(&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    2&lt;/span&gt; {&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    3&lt;/span&gt;   &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;form&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;RegisterForm&lt;/span&gt;()&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    4&lt;/span&gt;   &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    5&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_php&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getRequest&lt;/span&gt;()&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;isMethod&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;post&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;)) &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    6&lt;/span&gt;   {&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    7&lt;/span&gt;     &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;form&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;bind&lt;/span&gt;(&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    8&lt;/span&gt;       &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    9&lt;/span&gt;         &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;username&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getRequest&lt;/span&gt;(&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getParameter&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;username&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;),&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   10&lt;/span&gt;         &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;password&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getRequest&lt;/span&gt;()&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getParameter&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;password&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;),&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   11&lt;/span&gt;         &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;email&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getRequest&lt;/span&gt;()&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getParameter&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;email&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;),&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   12&lt;/span&gt;       )&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   13&lt;/span&gt;     )&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt; &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   14&lt;/span&gt;       &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   15&lt;/span&gt;       &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   16&lt;/span&gt;     &lt;span class=&quot;keyword keyword_control keyword_control_php&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;form&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;isValid&lt;/span&gt;()) &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   17&lt;/span&gt;     {&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   18&lt;/span&gt;       &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;values&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;form&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getValues&lt;/span&gt;()&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   19&lt;/span&gt;         &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   20&lt;/span&gt;       &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;setTemplate&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;registered&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;)&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   21&lt;/span&gt;         &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   22&lt;/span&gt;       &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;variable variable_other variable_other_property variable_other_property_php&quot;&gt;values&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;values&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   23&lt;/span&gt;       &lt;span class=&quot;keyword keyword_control keyword_control_php&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfView&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;constant constant_other constant_other_class constant_other_class_php&quot;&gt;SUCCESS&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   24&lt;/span&gt;     } &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   25&lt;/span&gt;   }&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   26&lt;/span&gt;     &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   27&lt;/span&gt;   &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;variable variable_other variable_other_property variable_other_property_php&quot;&gt;form&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;form&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   28&lt;/span&gt; }&lt;/span&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
So, a summary:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;We&#039;re creating a form.&lt;/li&gt;&lt;li&gt;We&#039;re checking if it&#039;s a POST.&lt;ul&gt;&lt;li&gt;If so:&lt;ul&gt;&lt;li&gt;We&#039;ll bind the parameters from the form back to the form object&lt;/li&gt;&lt;li&gt;We&#039;ll check the form passes validation&lt;/li&gt;&lt;li&gt;If it&#039;s valid, pass the values to a new &#039;registered&#039; template&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;If not, we&#039;ll assign the form variable to the template&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
And how does the default template look?&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;textmate-source mac_classic&quot;&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    1&lt;/span&gt; &lt;span class=&quot;text text_html text_html_basic&quot;&gt;&lt;span class=&quot;meta meta_tag meta_tag_block meta_tag_block_any meta_tag_block_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_block entity_name_tag_block_any entity_name_tag_block_any_html&quot;&gt;form&lt;/span&gt; &lt;span class=&quot;entity entity_other entity_other_attribute-name entity_other_attribute-name_html&quot;&gt;action&lt;/span&gt;=&lt;span class=&quot;string string_quoted string_quoted_double string_quoted_double_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;source source_php source_php_embedded source_php_embedded_line source_php_embedded_line_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;meta meta_function-call meta_function-call_php&quot;&gt;url_for&lt;/span&gt;(&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;user/register&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;) &lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;entity entity_other entity_other_attribute-name entity_other_attribute-name_html&quot;&gt;method&lt;/span&gt;=&lt;span class=&quot;string string_quoted string_quoted_double string_quoted_double_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html&quot;&gt;&quot;&lt;/span&gt;post&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    2&lt;/span&gt;     &lt;span class=&quot;meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    3&lt;/span&gt;         &lt;span class=&quot;source source_php source_php_embedded source_php_embedded_line source_php_embedded_line_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;form&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    4&lt;/span&gt;         &lt;span class=&quot;meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html&quot;&gt;td&lt;/span&gt; &lt;span class=&quot;entity entity_other entity_other_attribute-name entity_other_attribute-name_html&quot;&gt;colspan&lt;/span&gt;=&lt;span class=&quot;string string_quoted string_quoted_double string_quoted_double_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html&quot;&gt;&quot;&lt;/span&gt;2&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;entity entity_other entity_other_attribute-name entity_other_attribute-name_html&quot;&gt;type&lt;/span&gt;=&lt;span class=&quot;string string_quoted string_quoted_double string_quoted_double_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html&quot;&gt;&quot;&lt;/span&gt;submit&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; /&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    5&lt;/span&gt;     &lt;span class=&quot;meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    6&lt;/span&gt; &lt;span class=&quot;meta meta_tag meta_tag_block meta_tag_block_any meta_tag_block_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_block entity_name_tag_block_any entity_name_tag_block_any_html&quot;&gt;form&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
So, we define a form, echo our form variable and give it a submit button. Easy! (You can modify the presentation of the form and add nested forms in code, but I&#039;ll cover that another day..)&lt;br /&gt;
&lt;br /&gt;
The downside is that it&#039;s using tables for presentation. It&#039;s my understanding that you can plug in different form templates, but I haven&#039;t got that far yet.&lt;br /&gt;
&lt;br /&gt;
And the other template? Well that looks like:&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;textmate-source mac_classic&quot;&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    1&lt;/span&gt; &lt;span class=&quot;text text_html text_html_basic&quot;&gt;&lt;span class=&quot;meta meta_tag meta_tag_block meta_tag_block_any meta_tag_block_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_block entity_name_tag_block_any entity_name_tag_block_any_html&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;Form successful! Here are the values:&lt;span class=&quot;meta meta_tag meta_tag_block meta_tag_block_any meta_tag_block_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_block entity_name_tag_block_any entity_name_tag_block_any_html&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    2&lt;/span&gt; &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    3&lt;/span&gt; &lt;span class=&quot;source source_php source_php_embedded source_php_embedded_line source_php_embedded_line_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_php&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;values&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_logical keyword_operator_logical_php&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;id&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;value&lt;/span&gt;): &lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    4&lt;/span&gt;     &lt;span class=&quot;meta meta_tag meta_tag_block meta_tag_block_any meta_tag_block_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_block entity_name_tag_block_any entity_name_tag_block_any_html&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    5&lt;/span&gt;         &lt;span class=&quot;meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html&quot;&gt;strong&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;source source_php source_php_embedded source_php_embedded_line source_php_embedded_line_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;id&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html&quot;&gt;strong&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;:&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    6&lt;/span&gt;         &lt;span class=&quot;source source_php source_php_embedded source_php_embedded_line source_php_embedded_line_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;value&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    7&lt;/span&gt;     &lt;span class=&quot;meta meta_tag meta_tag_block meta_tag_block_any meta_tag_block_any_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;entity entity_name entity_name_tag entity_name_tag_block entity_name_tag_block_any entity_name_tag_block_any_html&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    8&lt;/span&gt; &lt;span class=&quot;source source_php source_php_embedded source_php_embedded_line source_php_embedded_line_html&quot;&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_php&quot;&gt;endforeach&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Simple, just a &lt;code&gt;foreach&lt;/code&gt; over the values. We&#039;re outputting the POSTs, basically.&lt;br /&gt;
&lt;br /&gt;
So far, so good.&lt;br /&gt;
&lt;br /&gt;
Now we&#039;ll get into the nitty-gritty a little more. We&#039;ll have a look at how the form object (RegisterForm) is created.&lt;br /&gt;
&lt;br /&gt;
So, let&#039;s take a look at RegisterForm:&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;textmate-source mac_classic&quot;&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    1&lt;/span&gt; &lt;span class=&quot;source source_php&quot;&gt;&lt;span class=&quot;meta meta_class meta_class_php&quot;&gt;&lt;span class=&quot;storage storage_type storage_type_class storage_type_class_php&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;entity entity_name entity_name_type entity_name_type_class entity_name_type_class_php&quot;&gt;RegisterForm&lt;/span&gt; &lt;span class=&quot;storage storage_modifier storage_modifier_extends storage_modifier_extends_php&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;entity entity_other entity_other_inherited-class entity_other_inherited-class_php&quot;&gt;sfForm&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    2&lt;/span&gt; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    3&lt;/span&gt; &lt;span class=&quot;meta meta_function meta_function_php&quot;&gt;    &lt;span class=&quot;storage storage_modifier storage_modifier_php&quot;&gt;public &lt;/span&gt;&lt;span class=&quot;storage storage_type storage_type_function storage_type_function_php&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;entity entity_name entity_name_function entity_name_function_php&quot;&gt;configure&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_php&quot;&gt;(&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    4&lt;/span&gt;     {&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    5&lt;/span&gt;         &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;setValidatorSchema&lt;/span&gt;(&lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;RegisterValidatorSchema&lt;/span&gt;())&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    6&lt;/span&gt;         &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;this&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;setWidgetSchema&lt;/span&gt;(&lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;RegisterWidgetFormSchema&lt;/span&gt;())&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    7&lt;/span&gt;     }&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    8&lt;/span&gt; &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    9&lt;/span&gt; &lt;span class=&quot;meta meta_function meta_function_php&quot;&gt;    &lt;span class=&quot;storage storage_modifier storage_modifier_php&quot;&gt;public &lt;/span&gt;&lt;span class=&quot;storage storage_type storage_type_function storage_type_function_php&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;entity entity_name entity_name_function entity_name_function_php&quot;&gt;bind&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;meta meta_function meta_function_arguments meta_function_arguments_php&quot;&gt;&lt;span class=&quot;meta meta_function meta_function_argument meta_function_argument_no-default meta_function_argument_no-default_php&quot;&gt;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;taintedValues&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   10&lt;/span&gt;     {&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   11&lt;/span&gt;         &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;request&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfContext&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_static meta_function-call_static_php&quot;&gt;getInstance&lt;/span&gt;()&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getRequest&lt;/span&gt;()&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   12&lt;/span&gt;         &lt;span class=&quot;keyword keyword_control keyword_control_php&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;request&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;hasParameter&lt;/span&gt;(&lt;span class=&quot;storage storage_type storage_type_php&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;variable variable_other variable_other_class variable_other_class_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;CSRFFieldName&lt;/span&gt;))&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   13&lt;/span&gt;         {&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   14&lt;/span&gt;             &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;taintedValues&lt;/span&gt;[&lt;span class=&quot;storage storage_type storage_type_php&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;variable variable_other variable_other_class variable_other_class_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;CSRFFieldName&lt;/span&gt;] &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;request&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_object meta_function-call_object_php&quot;&gt;getParameter&lt;/span&gt;(&lt;span class=&quot;storage storage_type storage_type_php&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;variable variable_other variable_other_class variable_other_class_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;CSRFFieldName&lt;/span&gt;)&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   15&lt;/span&gt;         }&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   16&lt;/span&gt; &lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   17&lt;/span&gt;         &lt;span class=&quot;storage storage_type storage_type_php&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_static meta_function-call_static_php&quot;&gt;bind&lt;/span&gt;(&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;taintedValues&lt;/span&gt;)&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   18&lt;/span&gt;     }&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   19&lt;/span&gt; }&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Take a look at the configure() method, it&#039;s the important one. We&#039;re assigning the form with a widget schema (a set of form widgets), and a validation schema (the new version of validation YAML). Really simple stuff, definitely.&lt;br /&gt;
&lt;br /&gt;
Note: I don&#039;t know if there&#039;s a better way than overriding the bind method. Overriding the bind method is just to transparently manage the CSRF protection. You can ignore that for now - the easy way is to add the extra array option in the action where you call -&gt;bind on the other POST vars.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at the widget schema we&#039;re using (RegisterWidgetFormSchema):&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;textmate-source mac_classic&quot;&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    1&lt;/span&gt; &lt;span class=&quot;source source_php&quot;&gt;&lt;span class=&quot;meta meta_class meta_class_php&quot;&gt;&lt;span class=&quot;storage storage_type storage_type_class storage_type_class_php&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;entity entity_name entity_name_type entity_name_type_class entity_name_type_class_php&quot;&gt;RegisterWidgetFormSchema&lt;/span&gt; &lt;span class=&quot;storage storage_modifier storage_modifier_extends storage_modifier_extends_php&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;entity entity_other entity_other_inherited-class entity_other_inherited-class_php&quot;&gt;sfWidgetFormSchema&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    2&lt;/span&gt; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    3&lt;/span&gt; &lt;span class=&quot;meta meta_function meta_function_php&quot;&gt;    &lt;span class=&quot;storage storage_modifier storage_modifier_php&quot;&gt;public &lt;/span&gt;&lt;span class=&quot;storage storage_type storage_type_function storage_type_function_php&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;support support_function support_function_magic support_function_magic_php&quot;&gt;__construct&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;meta meta_function meta_function_arguments meta_function_arguments_php&quot;&gt;&lt;span class=&quot;meta meta_function meta_function_argument meta_function_argument_default meta_function_argument_default_php&quot;&gt;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;options&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;,&lt;span class=&quot;meta meta_function meta_function_argument meta_function_argument_default meta_function_argument_default_php&quot;&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;attributes&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;,&lt;span class=&quot;meta meta_function meta_function_argument meta_function_argument_default meta_function_argument_default_php&quot;&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;labels&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;,&lt;span class=&quot;meta meta_function meta_function_argument meta_function_argument_default meta_function_argument_default_php&quot;&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;helps&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    4&lt;/span&gt;     {&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    5&lt;/span&gt;         &lt;span class=&quot;storage storage_type storage_type_php&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_static meta_function-call_static_php&quot;&gt;__construct&lt;/span&gt;(&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    6&lt;/span&gt;             &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    7&lt;/span&gt;                 &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;username&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfWidgetFormInput&lt;/span&gt;(&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;,&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    8&lt;/span&gt;                 &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;password&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt;  &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfWidgetFormInputPassword&lt;/span&gt;(),&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    9&lt;/span&gt;                 &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;email&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfWidgetFormInput&lt;/span&gt;(),&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   10&lt;/span&gt;             ),&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   11&lt;/span&gt;             &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;options&lt;/span&gt;,&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   12&lt;/span&gt;             &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;attributes&lt;/span&gt;,&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   13&lt;/span&gt;             &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;labels&lt;/span&gt;,&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   14&lt;/span&gt;             &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;helps&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   15&lt;/span&gt;         )&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   16&lt;/span&gt;     }&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   17&lt;/span&gt; }&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
I&#039;m not certain this is the best way to do this, but it seems to work just fine. I&#039;m overriding the constructor, and passing in the values I know the &#039;register&#039; form should have (in this case, a &#039;username&#039;, a &#039;password&#039; and an &#039;email&#039;). The sfWidgetFormInput is a simple input element (type=text), and predictably the sfWidgetFormInputPassword is just a password input element.&lt;br /&gt;
&lt;br /&gt;
So there we have it - now we can render a form, and have no validation on it.&lt;br /&gt;
&lt;br /&gt;
We can do more complex things in here, like nesting different forms and having groups of elements (I think, anyway). But I&#039;ll leave that for now.&lt;br /&gt;
&lt;br /&gt;
So, let&#039;s look at our validation rules in RegisterWidgetFormSchema:&lt;br /&gt;
&lt;br /&gt;
&lt;code class=&quot;textmate-source mac_classic&quot;&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    1&lt;/span&gt; &lt;span class=&quot;source source_php&quot;&gt;&lt;span class=&quot;meta meta_class meta_class_php&quot;&gt;&lt;span class=&quot;storage storage_type storage_type_class storage_type_class_php&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;entity entity_name entity_name_type entity_name_type_class entity_name_type_class_php&quot;&gt;RegisterValidatorSchema&lt;/span&gt; &lt;span class=&quot;storage storage_modifier storage_modifier_extends storage_modifier_extends_php&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;entity entity_other entity_other_inherited-class entity_other_inherited-class_php&quot;&gt;sfValidatorSchema&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    2&lt;/span&gt; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    3&lt;/span&gt; &lt;span class=&quot;meta meta_function meta_function_php&quot;&gt;    &lt;span class=&quot;storage storage_modifier storage_modifier_php&quot;&gt;public &lt;/span&gt;&lt;span class=&quot;storage storage_type storage_type_function storage_type_function_php&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;support support_function support_function_magic support_function_magic_php&quot;&gt;__construct&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;meta meta_function meta_function_arguments meta_function_arguments_php&quot;&gt;&lt;span class=&quot;meta meta_function meta_function_argument meta_function_argument_default meta_function_argument_default_php&quot;&gt;&lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;options&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;,&lt;span class=&quot;meta meta_function meta_function_argument meta_function_argument_default meta_function_argument_default_php&quot;&gt; &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;messages&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    4&lt;/span&gt;     {&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    5&lt;/span&gt;         &lt;span class=&quot;storage storage_type storage_type_php&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_class keyword_operator_class_php&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;meta meta_function-call meta_function-call_static meta_function-call_static_php&quot;&gt;__construct&lt;/span&gt;(&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    6&lt;/span&gt;             &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    7&lt;/span&gt;                 &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;username&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfValidatorString&lt;/span&gt;(&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;,&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    8&lt;/span&gt;                 &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;password&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfValidatorAny&lt;/span&gt;(&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;    9&lt;/span&gt;                     &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   10&lt;/span&gt;                         &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfValidatorString&lt;/span&gt;(&lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;min_length&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_php&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;,&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   11&lt;/span&gt;                         &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfValidatorRegex&lt;/span&gt;(&lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;pattern&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;string string_regexp string_regexp_single-quoted string_regexp_single-quoted_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;/&lt;/span&gt;&lt;span class=&quot;keyword keyword_operator keyword_operator_regexp keyword_operator_regexp_php&quot;&gt;^&lt;/span&gt;\d&lt;span class=&quot;string string_regexp string_regexp_arbitrary-repitition string_regexp_arbitrary-repitition_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_arbitrary-repitition punctuation_definition_arbitrary-repitition_php&quot;&gt;{&lt;/span&gt;2&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_arbitrary-repitition punctuation_definition_arbitrary-repitition_php&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;/&#039;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;),&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   12&lt;/span&gt;                     )&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   13&lt;/span&gt;                 ),&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   14&lt;/span&gt;                 &lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;email&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfValidatorAll&lt;/span&gt;(&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   15&lt;/span&gt;                     &lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   16&lt;/span&gt;                         &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfValidatorString&lt;/span&gt;(&lt;span class=&quot;meta meta_array meta_array_php&quot;&gt;&lt;span class=&quot;support support_function support_function_construct support_function_construct_php&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string string_quoted string_quoted_single string_quoted_single_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php&quot;&gt;&#039;&lt;/span&gt;min_length&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php&quot;&gt;&#039;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_key keyword_operator_key_php&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_php&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php&quot;&gt;)&lt;/span&gt;&lt;/span&gt;,&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   17&lt;/span&gt;                         &lt;span class=&quot;keyword keyword_other keyword_other_new keyword_other_new_php&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;support support_class support_class_php&quot;&gt;sfValidatorEmail&lt;/span&gt;(),&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   18&lt;/span&gt;                     )&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   19&lt;/span&gt;                 )&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   20&lt;/span&gt;             ),&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   21&lt;/span&gt;             &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;options&lt;/span&gt;,&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   22&lt;/span&gt;             &lt;span class=&quot;variable variable_other variable_other_php&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_php&quot;&gt;$&lt;/span&gt;messages&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   23&lt;/span&gt;         )&lt;span class=&quot;keyword keyword_operator keyword_operator_terminator keyword_operator_terminator_php&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   24&lt;/span&gt;     }&lt;br /&gt;
&lt;span class=&#039;linenum&#039;&gt;   25&lt;/span&gt; }&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
Similar to above, I&#039;m just overriding the constructor as passing in validators (making sure the array keys match the inputs defined in the widget schema).&lt;br /&gt;
&lt;br /&gt;
Let&#039;s take a closer look at our (wildly stupid) validation rules:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;username: simple string validator. This should be fairly familiar to symfony 1.0 kind of functionality.&lt;/li&gt;&lt;li&gt;		password: this gets a bit more complex, our validator is &#039;sfValidatorAny&#039;. This validator takes an array of parameters (which are other validators). It&#039;s like a boolean &#039;OR&#039; that says &quot;we must match any of the following validators&quot;. So what are the possible validators we can match?&lt;ul&gt;&lt;li&gt;sfValidatorString, min_length = 10&lt;/li&gt;&lt;li&gt;sfValidatorRegex, patterm = /^\d{2}/ (for the regex challenged, we must have two numbers at the start of the string)&lt;/li&gt;&lt;/ul&gt;So, in human terms, we must either have a password at least 10 chars long, or we must start our password with two numbers. So, &#039;abcdefgh&#039; is an invalid password, but &#039;abcdefghij&#039; is valid, and so is &#039;12abc&#039;.&lt;/li&gt;&lt;li&gt;email: similar to password, our validator is &#039;sfValidatorAll&#039;. In the way that sfValidatorAny was &#039;OR&#039;, this is like &#039;AND&#039;. It says that &lt;em&gt;all&lt;/em&gt; of the validators must pass. So what are the validators?&lt;ul&gt;&lt;li&gt;sfValidatorString, min_length = 10&lt;/li&gt;&lt;li&gt;sfValidatorEmail&lt;/li&gt;&lt;/ul&gt;Both of these should be pretty obvious to you - it must be an email that&#039;s at least 10 characters long. &#039;a@b.com&#039; will fail validation, but &#039;abcde@fghij.com&#039; will pass!&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
That pretty much wraps it up. It&#039;s pretty basic, but it&#039;ll give you enough to start building some basic forms and validating them. If I get a chance, I&#039;ll run through some more complex stuff another day? Hrm, maybe.&lt;br /&gt;
&lt;br /&gt;
Best of luck! Happy sf1.1&#039;ing! 
    </content:encoded>

    <pubDate>Mon, 26 Nov 2007 21:34:54 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/47-guid.html</guid>
    
</item>
<item>
    <title>MoBlog: Dennis Station Pride</title>
    <link>http://notjosh.com/blog/archives/46-MoBlog-Dennis-Station-Pride.html</link>
    
    <comments>http://notjosh.com/blog/archives/46-MoBlog-Dennis-Station-Pride.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=46</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://notjosh.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=46</wfw:commentRss>
    

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    &lt;p&gt;yep.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;a class=&quot;popfetcherimage&quot; href=&quot;http://notjosh.com/blog/uploads/mobile/DSC03042.JPG&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://notjosh.com/blog/uploads/mobile/DSC03042.thumb.JPG&quot; alt=&quot;Click for full size image&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 07 Nov 2007 08:30:05 +1100</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/46-guid.html</guid>
    
</item>

</channel>
</rss>