Home

Awesome

Cross Application Routing

This plugin allows to transparently used routes defined in other applications with no performance overhead or without loading applications' sfContext .

Usage :

Installation

Autoregister

The autoregister option load the route dynamically, this add a small overhead. You can speed up thing by setting the autoregister to false and add routes definition in the routing.yml file.

    [yml]
    # encapsulated route
    backend.edit_blog:
      url: /blog/edit/:id
      class: swEncapsulateRoute
      options:
        encapsulated:
          name: backend.edit_blog

Troubleshooting

How to check that externals routes are loaded ?

Routes from other applications are displayed in the log as : Connect swEncapsulateRoute "app_name.route_name" If routes are not present then something is wrong in your settings.

My settings look ok, but the routes do not appear

All routes loaded with an event or dynamically added at runtime cannot be used with this plugin. Routes have to be defined in the routing.yml of each application.

symfony's bootstraping get slower after plugin installation

This might occurs if you load all routes from others application, it is a good practice to be explicit when you load externals routes : populate the routes section with routes you need in the current application.