interface RouterInterface (View source)

Methods

resolveAction(Route $route)

No description

RouteCollection[]
getRoutes()

No description

addRoute(Route $route)

No description

getRouteByPath(string $path, RequestContext $context, array $routeAttributes = [])

Get a route given its path.

matchRoute(Request $request)

No description

loadRouteList(RouteListInterface $list)

No description

Details

RouteActionInterface resolveAction(Route $route)

Parameters

Route $route

Return Value

RouteActionInterface

RouteCollection[] getRoutes()

Return Value

RouteCollection[]

addRoute(Route $route)

Parameters

Route $route

Route getRouteByPath(string $path, RequestContext $context, array $routeAttributes = [])

Get a route given its path.

Parameters

string $path the path to be looked for
RequestContext $context the context to be used to match the routes
array $routeAttributes [output] if specified, this argument will contain the route attributes

Return Value

Route

Exceptions

NoConfigurationException If no routing configuration could be found
ResourceNotFoundException If the resource could not be found
MethodNotAllowedException If the resource was found but the request method is not allowed

MatchedRoute matchRoute(Request $request)

Parameters

Request $request

Return Value

MatchedRoute

Exceptions

NoConfigurationException If no routing configuration could be found
ResourceNotFoundException If the resource could not be found
MethodNotAllowedException If the resource was found but the request method is not allowed

loadRouteList(RouteListInterface $list)

Parameters

RouteListInterface $list