Definition at line 21 of file RouterInterface.php.
◆ dispatch()
◆ getNamedRoute()
Slim\Interfaces\RouterInterface::getNamedRoute |
( |
|
$name | ) |
|
Get named route object.
- Parameters
-
- Returns
- Exceptions
-
RuntimeException | If named route does not exist |
Implemented in Slim\Router.
◆ lookupRoute()
Slim\Interfaces\RouterInterface::lookupRoute |
( |
|
$identifier | ) |
|
◆ map()
Slim\Interfaces\RouterInterface::map |
( |
|
$methods, |
|
|
|
$pattern, |
|
|
|
$handler |
|
) |
| |
Add route.
- Parameters
-
| string[] | $methods Array of HTTP methods |
string | $pattern | The route pattern |
callable | $handler | The route callable |
- Returns
- RouteInterface
Implemented in Slim\Router.
◆ pathFor()
Slim\Interfaces\RouterInterface::pathFor |
( |
|
$name, |
|
|
array |
$data = [] , |
|
|
array |
$queryParams = [] |
|
) |
| |
Build the path for a named route including the base path.
- Parameters
-
string | $name | Route name |
array | $data | Named argument replacement data |
array | $queryParams | Optional query string parameters |
- Returns
- string
- Exceptions
-
RuntimeException | If named route does not exist |
InvalidArgumentException | If required data not provided |
Implemented in Slim\Router.
◆ popGroup()
Slim\Interfaces\RouterInterface::popGroup |
( |
| ) |
|
Removes the last route group from the array.
- Returns
- bool True if successful, else False
Implemented in Slim\Router.
◆ pushGroup()
Slim\Interfaces\RouterInterface::pushGroup |
( |
|
$pattern, |
|
|
|
$callable |
|
) |
| |
Add a route group to the array.
- Parameters
-
string | $pattern | The group pattern |
callable | $callable | A group callable |
- Returns
- RouteGroupInterface
Implemented in Slim\Router.
◆ relativePathFor()
Slim\Interfaces\RouterInterface::relativePathFor |
( |
|
$name, |
|
|
array |
$data = [] , |
|
|
array |
$queryParams = [] |
|
) |
| |
Build the path for a named route excluding the base path.
- Parameters
-
string | $name | Route name |
array | $data | Named argument replacement data |
array | $queryParams | Optional query string parameters |
- Returns
- string
- Exceptions
-
RuntimeException | If named route does not exist |
InvalidArgumentException | If required data not provided |
Implemented in Slim\Router.
◆ ALLOWED_METHODS
const Slim\Interfaces\RouterInterface::ALLOWED_METHODS = 1 |
◆ DISPATCH_STATUS
const Slim\Interfaces\RouterInterface::DISPATCH_STATUS = 0 |
The documentation for this interface was generated from the following file: