News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Joshua Thijssen:
@MultiParamConverter for Symfony2
August 06, 2012 @ 08:47:14

Joshua Thijssen has a recent post to his site about the MultiParamConverter available for the Symfony 2 framework - a tool he's created to make working with multiple slugs and entities.

If you know Symfony2, you probably are using (or at least, have heard of) the @paramConverter annotation 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.

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.

0 comments voice your opinion now!
symfony2 framework paramconverter multiple


blog comments powered by Disqus

Similar Posts

Community News: Zend Framework Preview 0.1.2 Released

SitePoint PHP Blog: The next hot PHP app you install might be IBM's

Derick Rethans' Blog: eZ Components 2007.2alpha1

PHPClasses.org: MODX: A CMS Framework Designed with PHP Developers in Mind

Alexander Netkachev's Blog: Create Ajax Login page with Dojo toolkit and Zend Framework


Community Events

Don't see your event here?
Let us know!


community performance laravel interview voicesoftheelephpant conference api example opinion version framework xdebug series library release extension podcast symfony2 php7 introduction

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework