Thank you, beberlei. I read you idea before writing post. Will be those 
Router's object cached or processed every page-request?
Also i did it in such style:

class ExtraLoader implements LoaderInterface {

    private $loaded = false;

    public function load($resource, $type = null) {
        if (true === $this->loaded) {
            throw new \RuntimeException('Do not add this loader twice');
        }

        $routes = new RouteCollection();

        $pattern = '/extra';
        $defaults = array(
            '_controller' => 'AcmeDemoBundle:Demo:extraRoute',
        );

        $route = new Route($pattern, $defaults);
        $routes->add('extraRoute', $route); 
        
        return $routes;
    }

plus

        <service id="acme.routing_loader" 
class="Acme\DemoBundle\Routing\ExtraLoader">
            <tag name="routing.loader"></tag>
        </service>

but still need add 3 rows in routing.yml file... I think this terrible 
overhead, think to forget about Symfony2, while it has such managers.

-- 
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