CompiledRouteCollection
class CompiledRouteCollection extends AbstractRouteCollection (View source)
Properties
protected array | $compiled | The compiled routes collection. |
|
protected array | $attributes | An array of the route attributes keyed by name. |
|
protected RouteCollection|null | $routes | The dynamically added routes that were added after loading the cached, compiled routes. |
|
protected Router | $router | The router instance used by the route. |
|
protected Container | $container | The container instance used by the route. |
Methods
Determine if a route in the array matches the request.
Get a route (if necessary) that responds when other available methods are present.
Throw a method not allowed HTTP exception.
Throw a method not allowed HTTP exception.
Return the CompiledUrlMatcherDumper instance for the route collection.
Convert the collection to a Symfony RouteCollection instance.
Add a route to the SymfonyRouteCollection instance.
Create a new CompiledRouteCollection instance.
Refresh the name look-up table.
Refresh the action look-up table.
Get a cloned instance of the given request without any trailing slash on the URI.
Determine if the route collection contains a given named route.
Get a route instance by its controller action.
Get all of the routes keyed by their HTTP verb / method.
Get all of the routes keyed by their name.
Details
protected array
checkForAlternateVerbs(Request $request)
Determine if any routes match on another HTTP verb.
protected Route|null
matchAgainstRoutes(array $routes, Request $request, bool $includingMethod = true)
Determine if a route in the array matches the request.
protected Route
getRouteForMethods(Request $request, array $methods)
Get a route (if necessary) that responds when other available methods are present.
protected never
requestMethodNotAllowed(Request $request, array $others, string $method)
Throw a method not allowed HTTP exception.
protected void
methodNotAllowed(array $others, string $method)
deprecated
deprecated use requestMethodNotAllowed
Throw a method not allowed HTTP exception.
CompiledUrlMatcherDumper
dumper()
Return the CompiledUrlMatcherDumper instance for the route collection.
RouteCollection
toSymfonyRouteCollection()
Convert the collection to a Symfony RouteCollection instance.
protected RouteCollection
addToSymfonyRoutesCollection(RouteCollection $symfonyRoutes, Route $route)
Add a route to the SymfonyRouteCollection instance.
void
refreshNameLookups()
Refresh the name look-up table.
This is done in case any names are fluently defined or if routes are overwritten.
void
refreshActionLookups()
Refresh the action look-up table.
This is done in case any actions are overwritten with new controllers.
protected Request
requestWithoutTrailingSlash(Request $request)
Get a cloned instance of the given request without any trailing slash on the URI.