title: Custom url generator class
body: <p>I am looking for a way to override the generation of the url for a specific route in Symfony2.
  In symfony 1.4 I used to do it like this:</p>
  
  <pre><code>RouteName:
    class: sfDoctrineRouteCollection
    options:
      model:                Model
      prefix_path:          /route/:id/:slug
      column:               id
      route_class:          CustomDoctrineRoute
  </code></pre>
  
  <hr>
  
  <pre><code>class CustomDoctrineRoute extends sfDoctrineRoute
  {
    public function generate($params, $context = array(), $absolute = false)
    {
      //custom logic on route params
  
      return parent::generate($params, $context, $absolute);
    }
  
  }
  </code></pre>