ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
__construct (RouteParser $routeParser, DataGenerator $dataGenerator) | |
Constructs a route collector. More... | |
addRoute ($httpMethod, $route, $handler) | |
Adds a route to the collection. More... | |
addGroup ($prefix, callable $callback) | |
Create a route group with a common prefix. More... | |
get ($route, $handler) | |
Adds a GET route to the collection. More... | |
post ($route, $handler) | |
Adds a POST route to the collection. More... | |
put ($route, $handler) | |
Adds a PUT route to the collection. More... | |
delete ($route, $handler) | |
Adds a DELETE route to the collection. More... | |
patch ($route, $handler) | |
Adds a PATCH route to the collection. More... | |
head ($route, $handler) | |
Adds a HEAD route to the collection. More... | |
getData () | |
Returns the collected route data, as provided by the data generator. More... | |
Protected Attributes | |
$routeParser | |
$dataGenerator | |
$currentGroupPrefix | |
Definition at line 5 of file RouteCollector.php.
FastRoute\RouteCollector::__construct | ( | RouteParser | $routeParser, |
DataGenerator | $dataGenerator | ||
) |
Constructs a route collector.
RouteParser | $routeParser | |
DataGenerator | $dataGenerator |
Definition at line 22 of file RouteCollector.php.
FastRoute\RouteCollector::addGroup | ( | $prefix, | |
callable | $callback | ||
) |
Create a route group with a common prefix.
All routes created in the passed callback will have the given group prefix prepended.
string | $prefix | |
callable | $callback |
Definition at line 57 of file RouteCollector.php.
Referenced by FastRoute\RouteCollectorTest\testGroups().
FastRoute\RouteCollector::addRoute | ( | $httpMethod, | |
$route, | |||
$handler | |||
) |
Adds a route to the collection.
The syntax used in the $route string depends on the used route parser.
string|string[] | $httpMethod | |
string | $route | |
mixed | $handler |
Definition at line 38 of file RouteCollector.php.
References $handler, and array.
Referenced by FastRoute\Dispatcher\DispatcherTest\testCapturing(), FastRoute\Dispatcher\DispatcherTest\testDuplicateStaticRoute(), FastRoute\Dispatcher\DispatcherTest\testDuplicateVariableNameError(), FastRoute\Dispatcher\DispatcherTest\testDuplicateVariableRoute(), and FastRoute\Dispatcher\DispatcherTest\testShadowedStaticRoute().
FastRoute\RouteCollector::delete | ( | $route, | |
$handler | |||
) |
Adds a DELETE route to the collection.
This is simply an alias of $this->addRoute('DELETE', $route, $handler)
string | $route | |
mixed | $handler |
Definition at line 112 of file RouteCollector.php.
References $handler.
Referenced by FastRoute\RouteCollectorTest\testGroups().
FastRoute\RouteCollector::get | ( | $route, | |
$handler | |||
) |
Adds a GET route to the collection.
This is simply an alias of $this->addRoute('GET', $route, $handler)
string | $route | |
mixed | $handler |
Definition at line 73 of file RouteCollector.php.
References $handler.
Referenced by FastRoute\RouteCollectorTest\testGroups().
FastRoute\RouteCollector::getData | ( | ) |
Returns the collected route data, as provided by the data generator.
Definition at line 148 of file RouteCollector.php.
FastRoute\RouteCollector::head | ( | $route, | |
$handler | |||
) |
Adds a HEAD route to the collection.
This is simply an alias of $this->addRoute('HEAD', $route, $handler)
string | $route | |
mixed | $handler |
Definition at line 138 of file RouteCollector.php.
References $handler.
Referenced by FastRoute\RouteCollectorTest\testGroups().
FastRoute\RouteCollector::patch | ( | $route, | |
$handler | |||
) |
Adds a PATCH route to the collection.
This is simply an alias of $this->addRoute('PATCH', $route, $handler)
string | $route | |
mixed | $handler |
Definition at line 125 of file RouteCollector.php.
References $handler.
Referenced by FastRoute\RouteCollectorTest\testGroups().
FastRoute\RouteCollector::post | ( | $route, | |
$handler | |||
) |
Adds a POST route to the collection.
This is simply an alias of $this->addRoute('POST', $route, $handler)
string | $route | |
mixed | $handler |
Definition at line 86 of file RouteCollector.php.
References $handler.
Referenced by FastRoute\RouteCollectorTest\testGroups().
FastRoute\RouteCollector::put | ( | $route, | |
$handler | |||
) |
Adds a PUT route to the collection.
This is simply an alias of $this->addRoute('PUT', $route, $handler)
string | $route | |
mixed | $handler |
Definition at line 99 of file RouteCollector.php.
References $handler.
Referenced by FastRoute\RouteCollectorTest\testGroups().
|
protected |
Definition at line 14 of file RouteCollector.php.
|
protected |
Definition at line 11 of file RouteCollector.php.
|
protected |
Definition at line 8 of file RouteCollector.php.