AbstractRouteCollection
abstract class AbstractRouteCollection implements Countable, IteratorAggregate, RouteCollectionInterface
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.
Compile the routes for caching.
Return the CompiledUrlMatcherDumper instance for the route collection.
Convert the collection to a Symfony RouteCollection instance.
Add a route to the SymfonyRouteCollection instance.
Get a randomly generated route name.
Get the route instances that should be pre-warmed.
Get an iterator for the items.
Count the number of items in the collection.
Details
at line 27
protected Route
handleMatchedRoute(Request $request, Route|null $route)
Handle the matched route.
at line 53
protected array
checkForAlternateVerbs(Request $request)
Determine if any routes match on another HTTP verb.
at line 73
protected Route|null
matchAgainstRoutes(array $routes, Request $request, bool $includingMethod = true)
Determine if a route in the array matches the request.
at line 99
protected Route
getRouteForMethods(Request $request, array $methods)
Get a route (if necessary) that responds when other available methods are present.
at line 115
protected never
requestMethodNotAllowed(Request $request, array $others, string $method)
Throw a method not allowed HTTP exception.
at line 131
array
compile()
Compile the routes for caching.
at line 158
CompiledUrlMatcherDumper
dumper()
Return the CompiledUrlMatcherDumper instance for the route collection.
at line 166
RouteCollection
toSymfonyRouteCollection()
Convert the collection to a Symfony RouteCollection instance.
at line 194
protected RouteCollection
addToSymfonyRoutesCollection(RouteCollection $symfonyRoutes, Route $route)
Add a route to the SymfonyRouteCollection instance.
at line 222
protected string
generateRouteName()
Get a randomly generated route name.
at line 237
array
getWarmableRoutes()
Get the route instances that should be pre-warmed.
For RouteCollection, this is the same as getRoutes(). For CompiledRouteCollection, this returns the cached Route instances from $cachedRoutesByName that are actually used during matching, not throwaway objects from getRoutes().
at line 247
Traversable
getIterator()
Get an iterator for the items.
at line 255
int
count()
Count the number of items in the collection.