com\setasign\SetaFramework\Router
AbstractRouter Class AbstractRouter
File: /SetaFramework/src/Router/AbstractRouter.php
Class hierarchy
Implements
- \Psr\Log\LoggerAwareInterface
Summary
Constants
DEFAULT_PRIORITY
Properties
$appendingRoutes
$logger
$prependingRoutes
Methods
appendRoute()
Route\RouteInterface $route,
string $after = '',
int $priority = AbstractRouter::DEFAULT_PRIORITY
Append a route after the route $after.
If $after is an empty string than the added route will be the last route.
The name of the route need to be unique.
Parameters
- $name : string
Name of the new route
- $route : Route\RouteInterface
Route
- $after : string
Append this route after the route with this name
- $priority : int
Exceptions
Throws RouteException
getRoute()
getRoutes()
prependRoute()
Route\RouteInterface $route,
string $before = '',
int $priority = AbstractRouter::DEFAULT_PRIORITY
Prepend a route before the route $before.
If $before is an empty string than the added route will be the first route.
The name of the route need to be unique.
Parameters
- $name : string
Name of the new route
- $route : Route\RouteInterface
Route
- $before : string
Prepend this route before the route with this name
- $priority : int
Exceptions
Throws RouteException
process()
Calls the match-method of all routes in the correct order and break if one route is matching
The result of a matching route will be merged with the default values of this and will be returned
Parameters
- $request : \Psr\Http\Message\RequestInterface
Exceptions
Throws RouteException
