<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Symfony Blog</title>
	<atom:link href="http://www.symfony-blog.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.symfony-blog.co.uk</link>
	<description>Two Guys, One Framework</description>
	<pubDate>Wed, 25 Feb 2009 12:09:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Type confusions in Symfony</title>
		<link>http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/</link>
		<comments>http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 12:33:06 +0000</pubDate>
		<dc:creator>baj</dc:creator>
		
		<category><![CDATA[symfony]]></category>

		<category><![CDATA[Type confusions in Symfony]]></category>

		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=13</guid>
		<description><![CDATA[I post this merely to point out how easy it is to forget to check EVERYTHING when you appear to have a bug.
I&#8217;ve been trying unsuccessfully for the last hour to save a string to my database, like

$myString = 'test';
&#160;
$object = new MyObject&#40;&#41;;
&#160;
$object-&#62;setName&#40;$myString&#41;;
&#160;
$object-&#62;save&#40;&#41;;

No matter how often I checked, including the requested value from the form [...]]]></description>
			<content:encoded><![CDATA[<p>I post this merely to point out how easy it is to forget to check EVERYTHING when you appear to have a bug.</p>
<p>I&#8217;ve been trying unsuccessfully for the last hour to save a string to my database, like</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #0000ff;">$myString</span> = <span style="color: #ff0000;">'test'</span>;
&nbsp;
<span style="color: #0000ff;">$object</span> = <span style="color: #000000; font-weight: bold;">new</span> MyObject<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$object</span>-&gt;<span style="color: #006600;">setName</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$myString</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$object</span>-&gt;<span style="color: #006600;">save</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>No matter how often I checked, including the requested value from the form submitting the data, the data held once in the object etc, the database only ever saved a 0.</p>
<p>So for example:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #0000ff;">$myString</span> = <span style="color: #ff0000;">'test'</span>;
&nbsp;
<span style="color: #0000ff;">$object</span> = <span style="color: #000000; font-weight: bold;">new</span> MyObject<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$object</span>-&gt;<span style="color: #006600;">setName</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$myString</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0000ff;">$object</span>-&gt;<span style="color: #006600;">save</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000066;">echo</span> <span style="color: #0000ff;">$object</span>-&gt;<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>would give</p>
<p><code>test</code></p>
<p>Yet the value in the MySQl DB says 0, despite being set to a varchar(255).</p>
<p>So what was it? Propel. When I initially built the model, my schema.yml had defined &#8216;name&#8217; as being an int. Of course, I had decided to change this, and changed it in the schema.yml&#8230; but forgot to rebuild the model&#8230; doh! The ORM was stepping in and saying &#8220;no, screw you buddy, you said this was an Int&#8221;</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='title' title='Use these links to share this page with others'>Bookmark and Share</div><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/&amp;title=Type confusions in Symfony' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img  src= 'http://del.icio.us/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[del.icio.us]'  title="favicon Image" /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/&amp;title=Type confusions in Symfony' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://digg.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Digg]'  title="favicon Image" /></a> <a href='http://www.facebook.com/share.php?u=http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.facebook.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Facebook]'  title="favicon Image" /></a> <a href='http://www.furl.net/storeIt.jsp?u=http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/&amp;t=Type confusions in Symfony' title='Save to Furl' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.furl.net/images/logo-favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Furl]'  title="logo-favicon Image" /></a> <a href='http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/&amp;title=Type confusions in Symfony' title='Save to Google Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.google.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Google]'  title="favicon Image" /></a> <a href='http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/&amp;t=Type confusions in Symfony' title='Save to MySpace' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.myspace.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[MySpace]'  title="favicon Image" /></a> <a href='http://www.stumbleupon.com/submit?url=http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/&amp;title=Type confusions in Symfony' title='Stumble It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.stumbleupon.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[StumbleUpon]'  title="favicon Image" /></a> <a href='http://technorati.com/faves?add=http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/' title='Add to my Technorati Favorites' onclick='target="_blank";' rel='nofollow'><img  src= 'http://technorati.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Technorati]'  title="favicon Image" /></a> <a href='https://favorites.live.com/quickadd.aspx?mkt=en-us&amp;url=http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/&amp;title=Type confusions in Symfony' title='Save to Windows Live' onclick='target="_blank";' rel='nofollow'><img  src= 'http://favorites.live.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Windows Live]'  title="favicon Image" /></a> <a href='http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;u=http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/&amp;t=Type confusions in Symfony' title='Save to Yahoo! Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.yahoo.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Yahoo!]'  title="favicon Image" /></a>  <a title='See more bookmark and sharing options...' href='http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony-blog.co.uk/2008/07/type-confusions-in-symfony/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Retrieving a random record in Symfony using Propel</title>
		<link>http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/</link>
		<comments>http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 19:15:57 +0000</pubDate>
		<dc:creator>baj</dc:creator>
		
		<category><![CDATA[symfony]]></category>

		<category><![CDATA[propel]]></category>

		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=12</guid>
		<description><![CDATA[Just a quicky, as I had to spend 10 mins looking this up hopefully it&#8217;ll save someone else time later.
I need to retrieve a random user from the users table, but didn&#8217;t know how to express a random record&#8230; this method will return a single random user, or can take an argument to return more [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quicky, as I had to spend 10 mins looking this up hopefully it&#8217;ll save someone else time later.</p>
<p>I need to retrieve a random user from the users table, but didn&#8217;t know how to express a random record&#8230; this method will return a single random user, or can take an argument to return more than 1<br />
<b>UserPeer</b></p>

<div class="wp_syntax"><div class="code"><pre class="php">	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getRandomUsers<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$num</span>=<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		<span style="color: #0000ff;">$c</span> = <span style="color: #000000; font-weight: bold;">new</span> Criteria<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0000ff;">$c</span>-&gt;<span style="color: #006600;">addAscendingOrderByColumn</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'rand()'</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0000ff;">$c</span>-&gt;<span style="color: #006600;">setLimit</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$num</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0000ff;">$users</span> = UserPeer::<span style="color: #006600;">doSelect</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$c</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$users</span>;	
	<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Simple. (and probably documented better somewhere else)</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='title' title='Use these links to share this page with others'>Bookmark and Share</div><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/&amp;title=Retrieving a random record in Symfony using Propel' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img  src= 'http://del.icio.us/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[del.icio.us]'  title="favicon Image" /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/&amp;title=Retrieving a random record in Symfony using Propel' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://digg.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Digg]'  title="favicon Image" /></a> <a href='http://www.facebook.com/share.php?u=http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.facebook.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Facebook]'  title="favicon Image" /></a> <a href='http://www.furl.net/storeIt.jsp?u=http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/&amp;t=Retrieving a random record in Symfony using Propel' title='Save to Furl' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.furl.net/images/logo-favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Furl]'  title="logo-favicon Image" /></a> <a href='http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/&amp;title=Retrieving a random record in Symfony using Propel' title='Save to Google Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.google.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Google]'  title="favicon Image" /></a> <a href='http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/&amp;t=Retrieving a random record in Symfony using Propel' title='Save to MySpace' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.myspace.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[MySpace]'  title="favicon Image" /></a> <a href='http://www.stumbleupon.com/submit?url=http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/&amp;title=Retrieving a random record in Symfony using Propel' title='Stumble It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.stumbleupon.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[StumbleUpon]'  title="favicon Image" /></a> <a href='http://technorati.com/faves?add=http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/' title='Add to my Technorati Favorites' onclick='target="_blank";' rel='nofollow'><img  src= 'http://technorati.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Technorati]'  title="favicon Image" /></a> <a href='https://favorites.live.com/quickadd.aspx?mkt=en-us&amp;url=http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/&amp;title=Retrieving a random record in Symfony using Propel' title='Save to Windows Live' onclick='target="_blank";' rel='nofollow'><img  src= 'http://favorites.live.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Windows Live]'  title="favicon Image" /></a> <a href='http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;u=http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/&amp;t=Retrieving a random record in Symfony using Propel' title='Save to Yahoo! Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.yahoo.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Yahoo!]'  title="favicon Image" /></a>  <a title='See more bookmark and sharing options...' href='http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony-blog.co.uk/2008/04/retrieving-a-random-record-in-symfony-using-propel/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using observe_field to update an input</title>
		<link>http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/</link>
		<comments>http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 19:58:50 +0000</pubDate>
		<dc:creator>baj</dc:creator>
		
		<category><![CDATA[symfony]]></category>

		<category><![CDATA[input]]></category>

		<category><![CDATA[observe_field]]></category>

		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=11</guid>
		<description><![CDATA[Had an issue on Acme Video Website where I want to prepopulate some content on a form element after making an ajax call to a 3rd party API.
Problems comes, in that observe_field (part of the prototype javascript library), is designed to update a div, so I was incorrectly trying to do this:

echo observe_field&#40;'hint', array&#40;
'update' =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Had an issue on Acme Video Website where I want to prepopulate some content on a form element after making an ajax call to a 3rd party API.</p>
<p>Problems comes, in that observe_field (part of the prototype javascript library), is designed to update a div, so I was incorrectly trying to do this:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000066;">echo</span> observe_field<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'hint'</span>, <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">'update'</span> =&gt; <span style="color: #ff0000;">&quot;tags&quot;</span>,
<span style="color: #ff0000;">'url'</span> =&gt; <span style="color: #ff0000;">'@embargo_helper'</span>,
<span style="color: #ff0000;">'with'</span> =&gt; <span style="color: #ff0000;">&quot;'hint=' + $('hint').value&quot;</span>,
<span style="color: #ff0000;">'loading'</span> =&gt; <span style="color: #ff0000;">&quot;'Loading...'&quot;</span>
<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>So it should take the value of the <i>hints</i> input element, go off to the 3rd party api, grab the info I need then pop it into the input that has an id of <i>tags</i> &#8230; only that doesn&#8217;t work, of course.</p>
<p>So what&#8217;s the solution?<br />
Ok, a 3 step process, firstly we need to add script = true in our observe_field parameters, letting the observe_field know that it&#8217;s going to have script returned that it will need to execute</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000066;">echo</span> observe_field<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'hint'</span>, <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">'update'</span> =&gt; <span style="color: #ff0000;">&quot;tags&quot;</span>,
<span style="color: #ff0000;">'url'</span> =&gt; <span style="color: #ff0000;">'@embargo_helper'</span>,
<span style="color: #ff0000;">'with'</span> =&gt; <span style="color: #ff0000;">&quot;'hint=' + $('hint').value&quot;</span>,
<span style="color: #ff0000;">'loading'</span> =&gt; <span style="color: #ff0000;">&quot;'Loading...'&quot;</span>,
<span style="color: #ff0000;">'script'</span> =&gt; <span style="color: #000000; font-weight: bold;">true</span>
<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>note: true without quotes.</p>
<p>Next, here&#8217;s a look at my action, of course it&#8217;s not really that important, you do whatever you need to do here:</p>
<p><b>Action</b></p>

<div class="wp_syntax"><div class="code"><pre class="php">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> executeHelper<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
  	<span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">description</span> = myTools::<span style="color: #006600;">getDescriptionFromHint</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'hint'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Then you need to edit the view to execute some javascript:</p>
<p><b>View</b></p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #0000ff;">$sf_context</span>-&gt;<span style="color: #006600;">getResponse</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>-&gt;<span style="color: #006600;">setContentType</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'text/javascript'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
$<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'tags'</span><span style="color: #66cc66;">&#41;</span>.value = <span style="color: #ff0000;">'&lt;?php echo $description;?&gt;'</span>;</pre></div></div>

<p>And there we go&#8230;</p>
<p>&#8230;now, I&#8217;m not entirely happy with this for 2 reasons. Firstly, the <i>update</i> parameter of the observe_field call is now redundant, and secondly, the id of the input we want to update is now harded in the view, so to at least get around that, we can add an extra parameter in the <i>with</i> part of observe_field like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000066;">echo</span> observe_field<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'hint'</span>, <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span>
<span style="color: #ff0000;">'update'</span> =&gt; <span style="color: #ff0000;">&quot;tags&quot;</span>,
<span style="color: #ff0000;">'url'</span> =&gt; <span style="color: #ff0000;">'@embargo_helper'</span>,
<span style="color: #ff0000;">'with'</span> =&gt; <span style="color: #ff0000;">&quot;'hint=' + $('hint').value+ '&amp;updateid=tags'&quot;</span>,
<span style="color: #ff0000;">'loading'</span> =&gt; <span style="color: #ff0000;">&quot;'Loading...'&quot;</span>,
<span style="color: #ff0000;">'script'</span> =&gt; <span style="color: #000000; font-weight: bold;">true</span>
<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>&#8230;so now we are letting our symfony code know what ID we want to update, so lets re-edit the action to take this into account:</p>
<p><b>Action</b></p>

<div class="wp_syntax"><div class="code"><pre class="php">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> executeHelper<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
  	<span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">description</span> = myTools::<span style="color: #006600;">getDescriptionFromHint</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'hint'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">updateid</span> = <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'updateid'</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>and then let the view know which id it needs to update:</p>
<p><b>View</b></p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #0000ff;">$sf_context</span>-&gt;<span style="color: #006600;">getResponse</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>-&gt;<span style="color: #006600;">setContentType</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'text/javascript'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
$<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'&lt;?php echo $updateid;?&gt;'</span><span style="color: #66cc66;">&#41;</span>.value = <span style="color: #ff0000;">'&lt;?php echo $description;?&gt;'</span>;</pre></div></div>

<p>I&#8217;m sure there&#8217;s a neater way of doing this, but hell, got it working anyway.</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='title' title='Use these links to share this page with others'>Bookmark and Share</div><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/&amp;title=Using observe_field to update an input' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img  src= 'http://del.icio.us/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[del.icio.us]'  title="favicon Image" /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/&amp;title=Using observe_field to update an input' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://digg.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Digg]'  title="favicon Image" /></a> <a href='http://www.facebook.com/share.php?u=http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.facebook.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Facebook]'  title="favicon Image" /></a> <a href='http://www.furl.net/storeIt.jsp?u=http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/&amp;t=Using observe_field to update an input' title='Save to Furl' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.furl.net/images/logo-favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Furl]'  title="logo-favicon Image" /></a> <a href='http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/&amp;title=Using observe_field to update an input' title='Save to Google Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.google.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Google]'  title="favicon Image" /></a> <a href='http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/&amp;t=Using observe_field to update an input' title='Save to MySpace' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.myspace.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[MySpace]'  title="favicon Image" /></a> <a href='http://www.stumbleupon.com/submit?url=http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/&amp;title=Using observe_field to update an input' title='Stumble It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.stumbleupon.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[StumbleUpon]'  title="favicon Image" /></a> <a href='http://technorati.com/faves?add=http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/' title='Add to my Technorati Favorites' onclick='target="_blank";' rel='nofollow'><img  src= 'http://technorati.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Technorati]'  title="favicon Image" /></a> <a href='https://favorites.live.com/quickadd.aspx?mkt=en-us&amp;url=http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/&amp;title=Using observe_field to update an input' title='Save to Windows Live' onclick='target="_blank";' rel='nofollow'><img  src= 'http://favorites.live.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Windows Live]'  title="favicon Image" /></a> <a href='http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;u=http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/&amp;t=Using observe_field to update an input' title='Save to Yahoo! Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.yahoo.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Yahoo!]'  title="favicon Image" /></a>  <a title='See more bookmark and sharing options...' href='http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony-blog.co.uk/2008/04/using-observe_field-to-update-an-input/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Before and After Actions</title>
		<link>http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/</link>
		<comments>http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 17:45:23 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[symfony]]></category>

		<category><![CDATA[action]]></category>

		<category><![CDATA[module]]></category>

		<category><![CDATA[post]]></category>

		<category><![CDATA[postExecute]]></category>

		<category><![CDATA[pre]]></category>

		<category><![CDATA[preExecute]]></category>

		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=10</guid>
		<description><![CDATA[Ever wanted to run some functions or create some variables before every action in a module? Or ever wanted to do something crafty after every action and before the template gets displayed?
Even if your answer is no, its good to be aware for future projects, that Symfony is hiding some very valuable methods of doing [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to run some functions or create some variables before every action in a module? Or ever wanted to do something crafty after every action and before the template gets displayed?</p>
<p>Even if your answer is no, its good to be aware for future projects, that Symfony is hiding some very valuable methods of doing such things. Read on&#8230;</p>
<p>For doing stuff before every action in your module, just create a new function called preExecute() like so:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">class</span> demomoduleActions <span style="color: #000000; font-weight: bold;">extends</span> sfActions
<span style="color: #66cc66;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> preExecute<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// ... put your stuff here that you want to run before every Action ...</span>
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Equally for doing anything you like after every action in your module just create a new function called postExecute() like so:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">class</span> demomoduleActions <span style="color: #000000; font-weight: bold;">extends</span> sfActions
<span style="color: #66cc66;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> postExecute<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// ... put your stuff here that you want to run after every Action ...</span>
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>It really is as simple as that. I stumbled across a little while ago whilst working on a project for a client of mine. So I thought I&#8217;d share this with you all.</p>
<p>Cheers,<br />
Rob</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='title' title='Use these links to share this page with others'>Bookmark and Share</div><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/&amp;title=Before and After Actions' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img  src= 'http://del.icio.us/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[del.icio.us]'  title="favicon Image" /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/&amp;title=Before and After Actions' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://digg.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Digg]'  title="favicon Image" /></a> <a href='http://www.facebook.com/share.php?u=http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.facebook.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Facebook]'  title="favicon Image" /></a> <a href='http://www.furl.net/storeIt.jsp?u=http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/&amp;t=Before and After Actions' title='Save to Furl' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.furl.net/images/logo-favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Furl]'  title="logo-favicon Image" /></a> <a href='http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/&amp;title=Before and After Actions' title='Save to Google Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.google.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Google]'  title="favicon Image" /></a> <a href='http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/&amp;t=Before and After Actions' title='Save to MySpace' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.myspace.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[MySpace]'  title="favicon Image" /></a> <a href='http://www.stumbleupon.com/submit?url=http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/&amp;title=Before and After Actions' title='Stumble It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.stumbleupon.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[StumbleUpon]'  title="favicon Image" /></a> <a href='http://technorati.com/faves?add=http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/' title='Add to my Technorati Favorites' onclick='target="_blank";' rel='nofollow'><img  src= 'http://technorati.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Technorati]'  title="favicon Image" /></a> <a href='https://favorites.live.com/quickadd.aspx?mkt=en-us&amp;url=http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/&amp;title=Before and After Actions' title='Save to Windows Live' onclick='target="_blank";' rel='nofollow'><img  src= 'http://favorites.live.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Windows Live]'  title="favicon Image" /></a> <a href='http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;u=http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/&amp;t=Before and After Actions' title='Save to Yahoo! Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.yahoo.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Yahoo!]'  title="favicon Image" /></a>  <a title='See more bookmark and sharing options...' href='http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony-blog.co.uk/2008/04/before-and-after-actions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>symfony routing, getting the param right!</title>
		<link>http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/</link>
		<comments>http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 12:55:47 +0000</pubDate>
		<dc:creator>baj</dc:creator>
		
		<category><![CDATA[symfony]]></category>

		<category><![CDATA[param]]></category>

		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=8</guid>
		<description><![CDATA[Weird one this, or so I thought.
Search functionality on &#8220;acme video website&#8221; was throwing up some odd errors.
View:
echo form_tag('/search');
Routing:
search:
  url: /search/*
  params: { module: video, action: search }
Performing a search, well, It didn&#8217;t break, but it went to:
http://www.acmevideowebsite.com/frontend_dev.php/search/module/search/action/index
all together now, &#8220;wtf?&#8221;
So, tried referencing the route with @
echo form_tag('@search');
Same result, so checking the generated [...]]]></description>
			<content:encoded><![CDATA[<p>Weird one this, or so I thought.</p>
<p>Search functionality on &#8220;acme video website&#8221; was throwing up some odd errors.</p>
<p>View:<br />
<code>echo form_tag('/search');</code></p>
<p>Routing:<br />
<code>search:<br />
  url: /search/*<br />
  params: { module: video, action: search }</code></p>
<p>Performing a search, well, It didn&#8217;t break, but it went to:<br />
http://www.acmevideowebsite.com/frontend_dev.php/search/module/search/action/index</p>
<p>all together now, &#8220;wtf?&#8221;</p>
<p>So, tried referencing the route with @<br />
<code>echo form_tag('@search');</code></p>
<p>Same result, so checking the generated HTML, we see&#8230;<br />
<code>action="/frontend_dev.php/search/module/default/action/index"</code></p>
<p>We now cross over live to the MSN conversation with Rob:<br />
<code><br />
Baj:// says:<br />
search:<br />
  url: /search/*<br />
  params: { module: video, action: search }<br />
Baj:// says:<br />
params:? or param:<br />
Rob says:<br />
lol<br />
</code></p>
<p>Grr, as usually with my coding, it&#8217;s something stupid&#8230; what confused me most was that it didn&#8217;t error on an incorrectly configured YAML file&#8230; probably because params: could be a legal term?</p>
<p>Anyway, back to work!</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='title' title='Use these links to share this page with others'>Bookmark and Share</div><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/&amp;title=symfony routing, getting the param right!' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img  src= 'http://del.icio.us/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[del.icio.us]'  title="favicon Image" /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/&amp;title=symfony routing, getting the param right!' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://digg.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Digg]'  title="favicon Image" /></a> <a href='http://www.facebook.com/share.php?u=http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.facebook.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Facebook]'  title="favicon Image" /></a> <a href='http://www.furl.net/storeIt.jsp?u=http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/&amp;t=symfony routing, getting the param right!' title='Save to Furl' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.furl.net/images/logo-favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Furl]'  title="logo-favicon Image" /></a> <a href='http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/&amp;title=symfony routing, getting the param right!' title='Save to Google Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.google.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Google]'  title="favicon Image" /></a> <a href='http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/&amp;t=symfony routing, getting the param right!' title='Save to MySpace' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.myspace.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[MySpace]'  title="favicon Image" /></a> <a href='http://www.stumbleupon.com/submit?url=http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/&amp;title=symfony routing, getting the param right!' title='Stumble It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.stumbleupon.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[StumbleUpon]'  title="favicon Image" /></a> <a href='http://technorati.com/faves?add=http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/' title='Add to my Technorati Favorites' onclick='target="_blank";' rel='nofollow'><img  src= 'http://technorati.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Technorati]'  title="favicon Image" /></a> <a href='https://favorites.live.com/quickadd.aspx?mkt=en-us&amp;url=http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/&amp;title=symfony routing, getting the param right!' title='Save to Windows Live' onclick='target="_blank";' rel='nofollow'><img  src= 'http://favorites.live.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Windows Live]'  title="favicon Image" /></a> <a href='http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;u=http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/&amp;t=symfony routing, getting the param right!' title='Save to Yahoo! Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.yahoo.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Yahoo!]'  title="favicon Image" /></a>  <a title='See more bookmark and sharing options...' href='http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony-blog.co.uk/2008/04/symfony-routing-getting-the-param-right/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AJAX Auto Complete</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/</link>
		<comments>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 16:52:32 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
		
		<category><![CDATA[symfony]]></category>

		<category><![CDATA[ajax]]></category>

		<category><![CDATA[input_auto_complete_tag]]></category>

		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5</guid>
		<description><![CDATA[I recently came across the problem of using multiple input_auto_complete_tag&#8217;s. The problem was I needed to store the ID of my first category somewhere, so I could filter the sub-categories returned in the second input_auto_complete_tag. Also, just to make things a little more complicated, there is a third input_auto_complete_tag that needs results filtered by the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across the problem of using multiple input_auto_complete_tag&#8217;s. The problem was I needed to store the ID of my first category somewhere, so I could filter the sub-categories returned in the second input_auto_complete_tag. Also, just to make things a little more complicated, there is a third input_auto_complete_tag that needs results filtered by the previous IDs.</p>
<p>Follow me, as I take you through a quick tutorial of how I did it:</p>
<p><strong>Form Template:</strong></p>
<p>Firstly we need create our form with the three auto completing inputs. To enable us to store the IDs that are returned we&#8217;ll put in a hidden tag for each input tag. Also to enable us to get the ID of the selected result, we&#8217;ll need a tiny bit of Javascript which runs after selecting the result.</p>
<p><em>/apps/app/modules/module/templates/formSuccess.php</em></p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> use_helper<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Javascript'</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;p&gt;&lt;?php
  <span style="color: #808080; font-style: italic;">// SELECT A</span>
  <span style="color: #000066;">echo</span>
    input_hidden_tag<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'select_a_id'</span>, <span style="color: #ff0000;">''</span><span style="color: #66cc66;">&#41;</span>.
    input_auto_complete_tag<span style="color: #66cc66;">&#40;</span>
      <span style="color: #ff0000;">'select_a'</span>,
      <span style="color: #ff0000;">''</span>,
      <span style="color: #ff0000;">'module/autoComplete?select=a'</span>,
      <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'autocomplete'</span> =&gt; <span style="color: #ff0000;">'off'</span><span style="color: #66cc66;">&#41;</span>,
      <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span>
        <span style="color: #ff0000;">'use_style'</span>             =&gt; <span style="color: #000000; font-weight: bold;">true</span>,
        <span style="color: #ff0000;">'after_update_element'</span>  =&gt; <span style="color: #ff0000;">&quot;function (inputField, selectedItem) { $('select_a_id').value = selectedItem.id; }&quot;</span>
      <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>;
?&gt;&lt;/p&gt;
&lt;p&gt;&lt;?php
  <span style="color: #808080; font-style: italic;">// SELECT B</span>
  <span style="color: #000066;">echo</span>
    input_hidden_tag<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'select_b_id'</span>, <span style="color: #ff0000;">''</span><span style="color: #66cc66;">&#41;</span>.
    input_auto_complete_tag<span style="color: #66cc66;">&#40;</span>
      <span style="color: #ff0000;">'select_b'</span>,
      <span style="color: #ff0000;">''</span>,
      <span style="color: #ff0000;">'module/autoComplete?select=b'</span>,
      <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'autocomplete'</span> =&gt; <span style="color: #ff0000;">'off'</span><span style="color: #66cc66;">&#41;</span>,
      <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span>
        <span style="color: #ff0000;">'use_style'</span>             =&gt; <span style="color: #000000; font-weight: bold;">true</span>,
        <span style="color: #ff0000;">'after_update_element'</span>  =&gt; <span style="color: #ff0000;">&quot;function (inputField, selectedItem) { $('select_b_id').value = selectedItem.id; }&quot;</span>,
        <span style="color: #ff0000;">'with'</span>                  =&gt; <span style="color: #ff0000;">&quot; value+'&amp;amp;select_a_id='+$('select_a_id').value&quot;</span>
      <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>;
?&gt;&lt;/p&gt;
&lt;p&gt;&lt;?php
  <span style="color: #808080; font-style: italic;">// SELECT C</span>
  <span style="color: #000066;">echo</span>
    input_hidden_tag<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'select_c_id'</span>, <span style="color: #ff0000;">''</span><span style="color: #66cc66;">&#41;</span>.
    input_auto_complete_tag<span style="color: #66cc66;">&#40;</span>
      <span style="color: #ff0000;">'select_c'</span>,
      <span style="color: #ff0000;">''</span>,
      <span style="color: #ff0000;">'module/autoComplete?select=c'</span>,
      <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'autocomplete'</span> =&gt; <span style="color: #ff0000;">'off'</span><span style="color: #66cc66;">&#41;</span>,
      <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span>
        <span style="color: #ff0000;">'use_style'</span>             =&gt; <span style="color: #000000; font-weight: bold;">true</span>,
        <span style="color: #ff0000;">'after_update_element'</span>  =&gt; <span style="color: #ff0000;">&quot;function (inputField, selectedItem) { $('select_c_id').value = selectedItem.id; }&quot;</span>,
        <span style="color: #ff0000;">'with'</span>                  =&gt; <span style="color: #ff0000;">&quot; value+'&amp;amp;select_a_id='+$('select_a_id').value+'&amp;amp;select_b_id='+$('select_b_id').value&quot;</span>
      <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>;
?&gt;&lt;/p&gt;</pre></div></div>

<p>The &#8216;after_update_element&#8217; simply takes the ID from the element we&#8217;ve clicked on, in the results of the auto complete function and places it into the hidden tag.</p>
<p>Select B and Select C use the &#8216;with&#8217; argument to send the ID of the previous selects to our auto complete function (module/autoComplete) enabling us to filter the results we&#8217;ll display in the input_auto_complete_tag.</p>
<p><strong>Auto Complete Function:</strong></p>
<p>The auto complete function will be called everytime we&#8217;re typing into one of the input_auto_complete_tag&#8217;s. As you can see in the code above, we&#8217;re also passing through a parameter (eg. module/autoComplete?select=a) specifying which input is calling the function.</p>
<p><em>/apps/app/modules/module/actions/actions.class.php</em></p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> executeAutoComplete<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// Get which input called the function</span>
    <span style="color: #0000ff;">$input</span> = <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'select'</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #808080; font-style: italic;">// Get what the user has typed</span>
    <span style="color: #0000ff;">$typed</span> = <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'select_'</span>.<span style="color: #0000ff;">$input</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #808080; font-style: italic;">// Depending what input called this generate $db_results for the template</span>
    <span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$input</span> <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
      <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'a'</span>:
&nbsp;
        <span style="color: #808080; font-style: italic;">//... generate $db_results</span>
&nbsp;
        <span style="color: #b1b100;">break</span>;
&nbsp;
      <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'b'</span>:
        <span style="color: #808080; font-style: italic;">// Get the IDs of previous inputs</span>
        <span style="color: #0000ff;">$a_id</span> = <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'select_a_id'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #808080; font-style: italic;">//... generate $db_results using $a_id to filter results</span>
&nbsp;
        <span style="color: #b1b100;">break</span>;
&nbsp;
      <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'c'</span>:
        <span style="color: #808080; font-style: italic;">// Get the IDs of previous inputs</span>
        <span style="color: #0000ff;">$a_id</span> = <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'select_a_id'</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0000ff;">$b_id</span> = <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'select_b_id'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #808080; font-style: italic;">//... generate $db_results using $a_id and $b_id to filter results</span>
&nbsp;
        <span style="color: #b1b100;">break</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;">// Create array with the ID and Name</span>
    <span style="color: #0000ff;">$results</span> = <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$db_results</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$row</span> <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
      <span style="color: #0000ff;">$results</span><span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$row</span>-&gt;<span style="color: #006600;">getId</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$row</span>-&gt;<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;">// Pass results to the template</span>
    <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">results</span> = <span style="color: #0000ff;">$results</span>;
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>I&#8217;ll leave you to generate the database results, as this is very specific to your database model. Although as a hint, it&#8217;s usually best to use an LIKE query:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #0000ff;">$criteria</span>-&gt;<span style="color: #006600;">add</span><span style="color: #66cc66;">&#40;</span> YourTablePeer::<span style="color: #006600;">NAME</span>, <span style="color: #0000ff;">$typed</span>.<span style="color: #ff0000;">'%'</span>, Criteria::<span style="color: #006600;">LIKE</span> <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><strong>Auto Complete Template:</strong></p>
<p><em>/apps/app/modules/module/templates/autoCompleteSuccess.php</em></p>

<div class="wp_syntax"><div class="code"><pre class="php">  &lt;ul&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$results</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$key</span> =&gt; <span style="color: #0000ff;">$value</span> <span style="color: #66cc66;">&#41;</span>: <span style="color: #000000; font-weight: bold;">?&gt;</span>
      &lt;li id=<span style="color: #ff0000;">&quot;&lt;?php echo $key ?&gt;&quot;</span>&gt;&lt;?php <span style="color: #000066;">echo</span> <span style="color: #0000ff;">$value</span> ?&gt;&lt;/li&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;/ul&gt;</pre></div></div>

<p>The auto complete template simply returns a unordered list which will be displayed on our form for the user to select from.</p>
<p>It&#8217;s really as easy as that, but if you&#8217;ve got any questions or queries about how to get it working for you, please leave a comment and I&#8217;ll try and help you out.</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='title' title='Use these links to share this page with others'>Bookmark and Share</div><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/&amp;title=AJAX Auto Complete' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img  src= 'http://del.icio.us/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[del.icio.us]'  title="favicon Image" /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/&amp;title=AJAX Auto Complete' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://digg.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Digg]'  title="favicon Image" /></a> <a href='http://www.facebook.com/share.php?u=http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.facebook.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Facebook]'  title="favicon Image" /></a> <a href='http://www.furl.net/storeIt.jsp?u=http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/&amp;t=AJAX Auto Complete' title='Save to Furl' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.furl.net/images/logo-favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Furl]'  title="logo-favicon Image" /></a> <a href='http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/&amp;title=AJAX Auto Complete' title='Save to Google Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.google.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Google]'  title="favicon Image" /></a> <a href='http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/&amp;t=AJAX Auto Complete' title='Save to MySpace' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.myspace.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[MySpace]'  title="favicon Image" /></a> <a href='http://www.stumbleupon.com/submit?url=http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/&amp;title=AJAX Auto Complete' title='Stumble It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.stumbleupon.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[StumbleUpon]'  title="favicon Image" /></a> <a href='http://technorati.com/faves?add=http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/' title='Add to my Technorati Favorites' onclick='target="_blank";' rel='nofollow'><img  src= 'http://technorati.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Technorati]'  title="favicon Image" /></a> <a href='https://favorites.live.com/quickadd.aspx?mkt=en-us&amp;url=http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/&amp;title=AJAX Auto Complete' title='Save to Windows Live' onclick='target="_blank";' rel='nofollow'><img  src= 'http://favorites.live.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Windows Live]'  title="favicon Image" /></a> <a href='http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;u=http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/&amp;t=AJAX Auto Complete' title='Save to Yahoo! Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.yahoo.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Yahoo!]'  title="favicon Image" /></a>  <a title='See more bookmark and sharing options...' href='http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Colons in YAML (view.yml)</title>
		<link>http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/</link>
		<comments>http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 13:17:36 +0000</pubDate>
		<dc:creator>baj</dc:creator>
		
		<category><![CDATA[symfony]]></category>

		<category><![CDATA[colons]]></category>

		<category><![CDATA[escape characters]]></category>

		<category><![CDATA[yaml]]></category>

		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=3</guid>
		<description><![CDATA[Having just launched &#8220;Acme Video Website&#8221;, I tinkered with a few things, re-synced and got&#8230;
Warning:  htmlentities() expects parameter 1 to be string, array given in /var/www/acme_video/docs/lib/symfony/config/sfViewConfigHandler.class.php on line 229
Ouchy. So I checked sfViewConfigHandler.class.php to see what was causing the fuss&#8230;
$data[] = sprintf("  \$response-&#62;addMeta('%s', '%s', false, false);", $name, str_replace('\'', '\\\'', preg_replace('/&#38;(?=\w+;)/', '&#38;', htmlentities($content, ENT_QUOTES, [...]]]></description>
			<content:encoded><![CDATA[<p>Having just launched &#8220;Acme Video Website&#8221;, I tinkered with a few things, re-synced and got&#8230;</p>
<p><code><strong>Warning</strong>:  htmlentities() expects parameter 1 to be string, array given in <strong>/var/www/acme_video/docs/lib/symfony/config/sfViewConfigHandler.class.php</strong> on line <strong>229</strong></code></p>
<p>Ouchy. So I checked sfViewConfigHandler.class.php to see what was causing the fuss&#8230;</p>
<p><code>$data[] = sprintf("  \$response-&gt;addMeta('%s', '%s', false, false);", $name, str_replace('\'', '\\\'', preg_replace('/&amp;(?=\w+;)/', '&amp;', htmlentities($content, ENT_QUOTES, sfConfig::get('sf_charset')))));</code></p>
<p>Sadly, my regex is non-existent so I&#8217;m not entirely sure what&#8217;s being replace, however, it was obvious there was an illegal character defined in my meta keyword/description in my View.yml (actual title changed to protect anonimity of website)</p>
<p><code>title: Lorem ipsum dolor sit amet: consectetuer adipiscing elit.</code></p>
<p>Hmm, completely forgot about the colon there (after &#8220;amet&#8221;), whatever&#8217;s parsing the yml is obviously having  a fit, and I need to leave that in there as the site owner wants to keep the original meta stuff for now.</p>
<p>So, tried \: to escape it, no deal! Time for a quick google, obviously&#8230;</p>
<p>According to the specifications for yml,<br />
&#8220;Within double-quotes, special characters may be represented with c-style escape sequences starting with a blackslash&#8221;</p>
<p><code>title: "Lorem ipsum dolor sit amet\: consectetuer adipiscing elit."</code></p>
<p>Which physically put \: in the html that was generated, so removing the \ gave be the desired result. All I had to do was encase the entire line in quotes, (and checking the source of the generated html it was fine too, not doing anything funky like 2 sets of quotes, always worth checking!).</p>
<p>Sure enough, refering to the excellent &#8220;<a href="http://www.amazon.co.uk/Definitive-Guide-Symfony-Experts-Source/dp/1590597869/ref=pd_bbs_sr_1?tag=symfblog-21&amp;ie=UTF8&amp;s=books&amp;qid=1207314885&amp;sr=8-1" title="The Definitive Guide To Symfony">The Definitive Guide To Symfony</a>&#8221; book, page 65 &#8220;Help, a YAML File Killed My App&#8221; shows exactly what I should have done anyway&#8230;</p>
<p>Todays lesson, don&#8217;t be so lazy, the book is only 2 meters across the corridor!</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='title' title='Use these links to share this page with others'>Bookmark and Share</div><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/&amp;title=Colons in YAML (view.yml)' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img  src= 'http://del.icio.us/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[del.icio.us]'  title="favicon Image" /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/&amp;title=Colons in YAML (view.yml)' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://digg.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Digg]'  title="favicon Image" /></a> <a href='http://www.facebook.com/share.php?u=http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.facebook.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Facebook]'  title="favicon Image" /></a> <a href='http://www.furl.net/storeIt.jsp?u=http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/&amp;t=Colons in YAML (view.yml)' title='Save to Furl' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.furl.net/images/logo-favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Furl]'  title="logo-favicon Image" /></a> <a href='http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/&amp;title=Colons in YAML (view.yml)' title='Save to Google Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.google.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Google]'  title="favicon Image" /></a> <a href='http://www.myspace.com/Modules/PostTo/Pages/?c=http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/&amp;t=Colons in YAML (view.yml)' title='Save to MySpace' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.myspace.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[MySpace]'  title="favicon Image" /></a> <a href='http://www.stumbleupon.com/submit?url=http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/&amp;title=Colons in YAML (view.yml)' title='Stumble It!' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.stumbleupon.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[StumbleUpon]'  title="favicon Image" /></a> <a href='http://technorati.com/faves?add=http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/' title='Add to my Technorati Favorites' onclick='target="_blank";' rel='nofollow'><img  src= 'http://technorati.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Technorati]'  title="favicon Image" /></a> <a href='https://favorites.live.com/quickadd.aspx?mkt=en-us&amp;url=http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/&amp;title=Colons in YAML (view.yml)' title='Save to Windows Live' onclick='target="_blank";' rel='nofollow'><img  src= 'http://favorites.live.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Windows Live]'  title="favicon Image" /></a> <a href='http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;u=http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/&amp;t=Colons in YAML (view.yml)' title='Save to Yahoo! Bookmarks' onclick='target="_blank";' rel='nofollow'><img  src= 'http://www.yahoo.com/favicon.ico'  width= '16'  height= '16'  border= '0'  alt= '[Yahoo!]'  title="favicon Image" /></a>  <a title='See more bookmark and sharing options...' href='http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony-blog.co.uk/2008/04/colons-in-meta-viewyml/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
