<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 19 Jun 2013 02:11:34 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Joshua Thijssen: @MultiParamConverter for Symfony2]]></title>
      <guid>http://www.phpdeveloper.org/news/18319</guid>
      <link>http://www.phpdeveloper.org/news/18319</link>
      <description><![CDATA[<p>
<i>Joshua Thijssen</i> has a recent post to his site about <a href="http://www.adayinthelifeof.nl/2012/08/04/multiparamconverter-for-symfony2/">the MultiParamConverter</a> available for the Symfony 2 framework - a tool he's created to make working with multiple slugs and entities.
</p>
<blockquote>
If you know Symfony2, you probably are using (or at least, have heard of) the <a href="http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html">@paramConverter annotation</a> from the SensioFrameworkExtraBundle. This is a really simple way to convert slugs into entities. But lots of times I find myself having multiple slugs inside my routes, and this is something the @paramConverter annotation cannot do. So that's why I've created the multiParamConverter.
</blockquote>
<p>
To review (or introduce it for those new to it) he talks a bit about the normal "paramConverter" (including a bit of code) and shows how it can replace the fetch of an entity based off a parameter via a DocBlock annotation. Due to the inflexibility of this method, his "MultiParamConverter" lets you define the association for multiple parameters For those that want a peek "under the covers", he includes a section on how it all works and what parts of the framework it uses. 
</p>]]></description>
      <pubDate>Mon, 06 Aug 2012 08:47:14 -0500</pubDate>
    </item>
  </channel>
</rss>
