RouteBuilder
class RouteBuilder implements RouteBuilderInterface, DestructableInterface (View source)
Managing class for rebuilding the router table.
Properties
| protected MatcherDumperInterface | $dumper | The dumper to which we should send collected routes. |
|
| protected LockBackendInterface | $lock | The used lock backend instance. |
|
| protected EventDispatcherInterface | $dispatcher | The event dispatcher to notify of routes. |
|
| protected ModuleHandlerInterface | $moduleHandler | The module handler. |
|
| protected ControllerResolverInterface | $controllerResolver | The controller resolver. |
|
| protected RouteCollection | $routeCollection | The route collection during the rebuild. |
|
| protected bool | $building | Flag that indicates if we are currently rebuilding the routes. |
|
| protected bool | $rebuildNeeded | Flag that indicates if we should rebuild at the end of the request. |
|
| protected CheckProviderInterface | $checkProvider | The check provider. |
Methods
Constructs the RouteBuilder using the passed MatcherDumperInterface.
Sets the router to be rebuilt next time rebuildIfNeeded() is called.
Rebuilds the route information and dumps it.
Rebuilds the route information if necessary, and dumps it.
Performs destruct operations.
Retrieves all defined routes from .routing.yml files.
Details
__construct(MatcherDumperInterface $dumper, LockBackendInterface $lock, EventDispatcherInterface $dispatcher, ModuleHandlerInterface $module_handler, ControllerResolverInterface $controller_resolver, CheckProviderInterface $check_provider)
Constructs the RouteBuilder using the passed MatcherDumperInterface.
setRebuildNeeded()
Sets the router to be rebuilt next time rebuildIfNeeded() is called.
bool
rebuild()
Rebuilds the route information and dumps it.
bool
rebuildIfNeeded()
Rebuilds the route information if necessary, and dumps it.
destruct()
Performs destruct operations.
protected array
getRouteDefinitions()
Retrieves all defined routes from .routing.yml files.