symfony-cmf/Routing — pull request #30 by Crell (2012-11-02 19:28:10+00:00)
Title: [WiP] NestedMatcher support

This in-progress branch represents a new model for the Matcher, called NestedMatcher. It was developed by the Drupal project, but deliberately with the intent of it coming back upstream. All of the code in this PR is (c) Larry Garfield and not Drupal-specific, so it's all license-safe for MIT licensing.

The basic idea is that rather than a matcher that finds a single route, we allow a matcher to find multiple possible routes. Then we allow N separate objects to filter that list until it either becomes empty (and then throw a 404 or 405 or 415 or whatever the appropriate error is) or we end up with just a single route left and that's the found route. Win!

This code is not commit ready; at the moment it's still using Drupal code formatting standards. Sorry. ;-) But I want to open the discussion of merging this model back into CMF cleanly, so that Drupal can just drop our version and use the CMF Routing library directly.

This definitely needs some revision yet, and needs to get integrated properly rather than just be a bunch of extra classes.

For background, there's some good background discussion here: http://drupal.org/node/1784040

Discuss. :-)