<?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, 29 May 2008 05:19:33 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>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>
<item>
    <title>Why Motorsports Suck!</title>
    <link>http://notjosh.com/blog/archives/45-Why-Motorsports-Suck!.html</link>
    
    <comments>http://notjosh.com/blog/archives/45-Why-Motorsports-Suck!.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=45</wfw:comment>

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

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    Over the last few weeks, a lot of what I&#039;ve seen on (weekend) TV has been centred around motor sports. I was up late watching some random F1 racing, and I gained a whole new appreciation for the way they work. I mean, there&#039;s not a lot of room for error - the speed and consistency at which they operate is pretty mind blowing.&lt;br /&gt;
&lt;br /&gt;
The next event was the inaugural Bathurst 1000. Followed a week or two later by the Phillip Island MotoGP and some miscellaneous drag racing.&lt;br /&gt;
&lt;br /&gt;
My gripe is the amount of fuel we&#039;re completely wasting in the name of entertainment. Hell, ultimately I&#039;m grumpy about the overall amount of fuel/energy we&#039;re wasting in most aspects of day-to-day life, but folk doing it on TV set a pretty average precedent.&lt;br /&gt;
&lt;br /&gt;
I shudder to think about things like the amount of fuel consumed around the Phillip Island MotoGP weekend - not only on the track, but by the ba-jillions of fans, commuting to and from the event.&lt;br /&gt;
&lt;br /&gt;
From what I understand (which isn&#039;t much..), the fuels used in the SUPER ELITE SPORTING VEHICLES is pretty clean, and emits less &#039;crap&#039; than your general unleaded petrol, but the fact is we&#039;re still running out of fossil fuels, and the cost of oil isn&#039;t coming down much. At all. And the goal is to be the fastest, not the most efficient (well, in most cases). Then there&#039;s the hours poured into testing of new engines and tyres and whatnot, which of course burns more fuel. So all things considered, there&#039;s a lot of wastage.&lt;br /&gt;
&lt;br /&gt;
These days, I go through quite little petrol in my car. I still catch a bus and a train to work (which obviously burns some fuel), but it&#039;s definitely better than driving AND having the buses/trains running. The most fuel I&#039;ve used this year can be attributed to getting to and from the snow, which on reflection, feels horrible. I know I&#039;m merely a drop in the ocean, and I know that in the big picture I&#039;m doing a horribly minor percentage of the damage, but I still can&#039;t shake the feeling that I&#039;m doing something I really shouldn&#039;t be.&lt;br /&gt;
&lt;br /&gt;
I really want to go camping, and I really want to go on more road trips around the place, but I still can&#039;t justify it to myself. Granted, that little voice in my head likely wouldn&#039;t often stop me actually &lt;em&gt;doing&lt;/em&gt; whatever I felt I wanted to (going camping, going to the snow), but it still feels pretty average.&lt;br /&gt;
&lt;br /&gt;
A quick (i.e. likely wrong) calculation. Bathurst 1000 had 18 (or so?) cars starting? Something like that. Hell, let&#039;s go ultra conservative here. Let&#039;s say 10 cars. To use round (and very optimistic) numbers, let&#039;s say it does 10L/100km. So, every car uses 100L of fuel to get through 1000km of track. And because we said there was 10 cars, that&#039;s 1000L of fuel used on the day, with 10000km of track covered. And that is &lt;em&gt;very&lt;/em&gt; conservative (okay, I did some research now. According to v8supercars.com.au, there were 30 cars starting, with 16 cars finishing the race. So, we&#039;re talking at least 16000km of driving, but likely somewhere over 20000km)&lt;br /&gt;
&lt;br /&gt;
Judging by my service history, so far this year my car has travelled just a little over 10000km in total (which included a winter of trips to the snow). And I can say with near-certainty that my car (2.0 litre, 4 cylinder, all-wheel drive) is a lot more fuel efficient than theirs (despite me having air conditioning and all those other luxuries that reduce overall efficiency). Suddenly I feel a whole lot less guilty in my simple pleasures.&lt;br /&gt;
&lt;br /&gt;
I&#039;m still not sure about the camping road-trips, though. Time to buy a Prius?&lt;br /&gt;
&lt;br /&gt;
P.S. I&#039;m sure I&#039;m using the wrong word when I talk about the &#039;efficiency&#039; of these vehicles. It&#039;s completely in their best interests to be as efficient as possible (aerodynamics, not wasting energy from the engine to the wheel, etc). They still use a helluva lot of fuel, though. I guess my car would use a lot of fuel at 300km/h too. Hmm. 
    </content:encoded>

    <pubDate>Sun, 21 Oct 2007 03:42:24 +1000</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/45-guid.html</guid>
    
</item>
<item>
    <title>MoBlog: Apology Denied!</title>
    <link>http://notjosh.com/blog/archives/44-MoBlog-Apology-Denied!.html</link>
    
    <comments>http://notjosh.com/blog/archives/44-MoBlog-Apology-Denied!.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=44</wfw:comment>

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

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    &lt;p&gt;:[&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;a class=&quot;popfetcherimage&quot; href=&quot;http://notjosh.com/blog/uploads/mobile/DSC02991.JPG&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://notjosh.com/blog/uploads/mobile/DSC02991.thumb.JPG&quot; alt=&quot;Click for full size image&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;What&#039;s worse - they seemed to have stopped making the yoghurt I (occasionally) eat. No more yoghurt evar.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 11 Sep 2007 15:10:04 +1000</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/44-guid.html</guid>
    
</item>
<item>
    <title>Pump up the jam!</title>
    <link>http://notjosh.com/blog/archives/43-Pump-up-the-jam!.html</link>
    
    <comments>http://notjosh.com/blog/archives/43-Pump-up-the-jam!.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=43</wfw:comment>

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

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    Today isn&#039;t a total write-off. I&#039;ve learnt about jam. And preserves. And Jelly. And conserves!&lt;br /&gt;
&lt;br /&gt;
Take heed:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;jelly = spread made only with juice&lt;br /&gt;
jam = spread made with partial fruit&lt;br /&gt;
preserves = spread made with fruit hunks&lt;br /&gt;
the difference is in how it&#039;s cooked and prepared ;)&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
And then I ignorantly ask:&lt;br /&gt;
&lt;blockquote&gt;it often gets labelled as the one thing though, right?&lt;br /&gt;
&#039;need me some jam!&#039; &lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
And the reply:&lt;br /&gt;
&lt;blockquote&gt;jelly is always clear, made from fruit juice.... jam is always processed whole fruit (envision in a blender) ... and preserves is someone chopping them into hunks and throwing them in ;)&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
And because I&#039;m curious:&lt;br /&gt;
&lt;blockquote&gt;what about marmalade?&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
And the reply?&lt;br /&gt;
&lt;blockquote&gt;that&#039;s a type of preserves&lt;br /&gt;
made with citrus fruit &lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
And again, curiously (but ignorantly?):&lt;br /&gt;
&lt;blockquote&gt;and preserves are the same as conserves?&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Think again, g&#039;friiiend:&lt;br /&gt;
&lt;blockquote&gt;conserves is jam ;)&lt;br /&gt;
usually from a mixture of fruits&lt;br /&gt;
instead of just one&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks &lt;a href=&quot;http://elizabethmariesmith.com/&quot;  title=&quot;Elizabeth Smith&quot;&gt;pal&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Tue, 11 Sep 2007 10:55:43 +1000</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/43-guid.html</guid>
    
</item>
<item>
    <title>MoBlog: A protest against the crackdown on jay w</title>
    <link>http://notjosh.com/blog/archives/42-MoBlog-A-protest-against-the-crackdown-on-jay-w.html</link>
    
    <comments>http://notjosh.com/blog/archives/42-MoBlog-A-protest-against-the-crackdown-on-jay-w.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=42</wfw:comment>

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

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    &lt;p&gt;A protest against the crackdown on jay walking?&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;a class=&quot;popfetcherimage&quot; href=&quot;http://notjosh.com/blog/uploads/mobile/DSC02958.JPG&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://notjosh.com/blog/uploads/mobile/DSC02958.thumb.JPG&quot; alt=&quot;Click for full size image&quot; /&gt;&lt;/a&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 09 Aug 2007 11:40:04 +1000</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/42-guid.html</guid>
    
</item>
<item>
    <title>Java is Insecure</title>
    <link>http://notjosh.com/blog/archives/41-Java-is-Insecure.html</link>
    
    <comments>http://notjosh.com/blog/archives/41-Java-is-Insecure.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=41</wfw:comment>

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

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded>
    Java is insecure.&lt;br /&gt;
&lt;br /&gt;
There, I&#039;ve said it. I&#039;m not a Java developer, and I really don&#039;t know the&lt;br /&gt;
ins-and-outs of Java development, but that doesn&#039;t stop me being ignorant like&lt;br /&gt;
the rest of them.&lt;br /&gt;
&lt;br /&gt;
I&#039;m at work, and a few minutes ago there was a mini-PHP bashing session. First,&lt;br /&gt;
the guy opposite me was explaining to me how PHP is vulnerable to SQL injection&lt;br /&gt;
attacks. My response was implying that he should stop coding Java applications&lt;br /&gt;
without Hibernate (or any other DAO/ORM) and see how far that gets him with&lt;br /&gt;
security. The same thing for PHP - I use ORM/DAO tools to assist my development&lt;br /&gt;
(not only is it more secure, but i find it much more productive. Win!).&lt;br /&gt;
&lt;br /&gt;
The problem I find is more about education. As a developer, he&lt;br /&gt;
&lt;em&gt;understands&lt;/em&gt; SQL injection, and if necessary, he could protect himself&lt;br /&gt;
against it. In an ideal world there&#039;s automated tools that manage the protection&lt;br /&gt;
for you (because human error is just too common). It seems too many PHP&lt;br /&gt;
&quot;developers&quot; are not educated enough to deal with the implicit risks involved in&lt;br /&gt;
using PHP, or (as mentioned), the human error/laziness kicks in, and security is&lt;br /&gt;
overlooked. Maybe there&#039;s not the budget for it. Either way, PHP itself is not&lt;br /&gt;
at fault.&lt;br /&gt;
&lt;br /&gt;
So then I migrated over to join the slightly larger group of people bashing PHP.&lt;br /&gt;
As I arrived, I was immediately recognised as &#039;the guy&#039; that would have a vague&lt;br /&gt;
idea about what was in question. They were discussing how a site had been&lt;br /&gt;
developed in PHP and there was talk of issues integrating a mobile side of the&lt;br /&gt;
app, and a guy chirped in saying &#039;well, I&#039;d probably want to use Java for that&#039;.&lt;br /&gt;
Understandable, he knows Java - it&#039;s only natural. He mentioned that it was&lt;br /&gt;
because they have libraries to assist with that kind of stuff, and went on to&lt;br /&gt;
say that PHP couldn&#039;t do that same stuff. That&#039;s where he crossed the line.&lt;br /&gt;
Honestly, I have no idea if PHP has libraries to help out, but that&#039;s far from&lt;br /&gt;
the point. He was saying how he can use a single tag to generate a different&lt;br /&gt;
sized image based on the client&#039;s mobile device.&lt;br /&gt;
&lt;br /&gt;
So, the fact that Java has libraries written makes PHP an inferior platform?&lt;br /&gt;
&lt;br /&gt;
I just find it awfully arrogant. I mean, I &lt;em&gt;entirely&lt;/em&gt; understand where he&#039;s&lt;br /&gt;
coming from, and I agree that too many PHP applications are insecure and do&lt;br /&gt;
things the &quot;long way&quot;, but they don&#039;t all have to be like that. What was Java&lt;br /&gt;
development like before Spring, Hibernate and whatever else is a buzzword in&lt;br /&gt;
Java these days? I remember talk of EJBs and Struts, which was all met with&lt;br /&gt;
winces of agony - no one wanted to do it. Same deal? Did that make Java any less&lt;br /&gt;
attractive? Apparently not.&lt;br /&gt;
&lt;br /&gt;
This is awfully one side, and trust me, I know there&#039;s a right tool for every&lt;br /&gt;
job. But I think blind language bashing is just cheap ignorance.&lt;br /&gt;
&lt;br /&gt;
There are many, &lt;em&gt;many&lt;/em&gt; more facets to the PHP vs Java argument which people&lt;br /&gt;
should be much more considerate of. Java, whilst being powerful, is certainly&lt;br /&gt;
not the tool for every job.&lt;br /&gt;
&lt;br /&gt;
Go team.&lt;br /&gt;
&lt;br /&gt;
Many more days like this to come, I anticipate. 
    </content:encoded>

    <pubDate>Fri, 29 Jun 2007 11:02:31 +1000</pubDate>
    <guid isPermaLink="false">http://notjosh.com/blog/archives/41-guid.html</guid>
    
</item>
<item>
    <title>MoBlog: What's Cooking?</title>
    <link>http://notjosh.com/blog/archives/40-MoBlog-Whats-Cooking.html</link>
    
    <comments>http://notjosh.com/blog/archives/40-MoBlog-Whats-Cooking.html#comments</comments>
    <wfw:comment>http://notjosh.com/blog/wfwcomment.php?cid=40</wfw:comment>

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

    <author>nospam@example.com (joshua paul may)</author>
    <content:encoded