fabpot/Silex — pull request #736 by tiraeth (2013-06-24 20:49:06+00:00)
Title: Mounted controllers are staged until application's flush

Probably a better solution for #716 than the one proposed in #734. License is MIT of course.

This PR changed the way the mount works. All mounted controllers get staged (under ``MountController`` instance) until you call ``flush()`` on the application. This way, the order in which you add routes is always known to the user.

I didn't want to use ``if...else`` in ``flush()`` so I decided to introduce a new interface and move attach logic from ControllerCollection to Controller.

I am not sure if this is the right direction so please give me the feedback.

There is a test case to check if staging works fine.