title: Processing Query Strings?
body: <p>Built an API using Symfony2, FOSRest and Doctrine. Given the following route:</p>
  
  <pre><code>"GET /api/path/to/product"
  </code></pre>
  
  <p>And the following parameters:</p>
  
  <pre><code>[("vendorID", 10), ("destination", "tanzania"), ("type", "accommodation"), ("sort", "price", "ASC")]
  </code></pre>
  
  <p>Using FOSRest bundle its possible to retrieve these strings, however, mapping them to doctrine queries is where the challenge arises.</p>
  
  <p>I thought about using numerous case statements customised for the different combinations of query strings, not an elegant solution. Would like to build a more generic controller that won't severely affect performance. Any advice will help.</p>