liip/LiipImagineBundle — pull request #271 by uwej711 (2013-11-11 11:07:36+00:00)
Title: [RFC,WIP] add variables to generated routes for dynamic filters 

This PR adds the possibility to have additional variables in the generated routes to implement dynamic filters.

I had a look at the discussion in https://github.com/liip/LiipImagineBundle/pull/42 and propose this as an alternative.

Currently there are no tests for this feature and this is only implemented in the WebPathResolver not in any of the AWS S3 resolvers.

This is also a BC break since it adds an extra parameter to ResolverInterface::getBrowserPath if you implemented your own resolver.

To use it configure the filter like this
```
dynamic:
route:
variables: [width, height]
requirements:
width: '2\d{2}'
height: '\d{3}'
```
where your requirements protect you from the DDoS threat. In the template you can pass the parameters to the filter:
```
imagine_filter('dynamic', false, {'width': 240, 'height' : 120} )
```
and then you can do something useful with it in a custom controller:
```
$config = $filterConfig->get($filter);
$config['filters']['thumbnail']['size'] = array($request->get('width'), $request->get('height'));
$filterConfig->set($filter, $config);
```