symfony/symfony — pull request #5651 by jmather (2012-10-02 17:18:46+00:00)
Title: [Routing] Added an optional event trigger for handleRouteRequirements

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: -- as much as they did before
Fixes the following tickets: none
Todo: Documentation
License of the code: MIT
Documentation PR:

Ran into an issue where having a more flexible routing requirements implementation would be helpful, and wanted to see if there was any interest in this.

I added an optional event trigger to handleRouteRequirements to enable more flexible routing rules.

Initially the the use case is when implementing Accept header based routing, but I figured others may want to use that in addition to other custom routing rules, at which point, using the event dispatcher optionally made sense.

You can find my current use-case here: https://gist.github.com/3805361