David asked me if we could contribute the code to the CMF routing bundle. I
talked to my boss, and it turns out we could.

The code is under MIT license, and is not a separate bundle. License and
copyright notice is included in each file.

There's two classes. ChainRouter and TaggedSubrouterPass. The latter is a
compiler pass, so you'll have to set up your bundle to use it. I removed the
namespaces, so you'll have to namespace them as appropriate yourselves.

It expects the chain router to be registered as a service with the id
chain_router. The expected tag is chain_router.subrouters, and priority is a
required parameter. You will need to alias router to chain_router. The
service router.real is automatically added at priority 100.

The code for ChainRouter is available here:
http://pastie.textmate.org/private/r8vs6vtacdonnnmdjderq
And the code for TaggedSubrouterPass is available here:
http://pastie.textmate.org/private/apz8houb7yrhlktq0cr5w

Stuff still to do includes making priority optional in the service
definition, and not always using router.real (i.e. using routing.cached when
appropriate), and making sure it still allows you to dump routes.

Magnus Nordlander

On Sun, May 15, 2011 at 8:22 PM, Beau Simensen <[email protected]> wrote:

> I'd love to hear about this as well.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to