Definition at line 21 of file RouteInterface.php.
◆ __invoke()
Dispatch route callable against current Request and Response objects.
This method invokes the route object's callable. If middleware is registered for the route, each callable middleware is invoked in the order specified.
- Parameters
-
ServerRequestInterface | $request | The current Request object |
ResponseInterface | $response | The current Response object |
- Returns
- ResponseInterface
◆ add()
Slim\Interfaces\RouteInterface::add |
( |
|
$callable | ) |
|
Add middleware.
This method prepends new middleware to the route's middleware stack.
- Parameters
-
callable | string | $callable | The callback routine |
- Returns
- RouteInterface
◆ getArgument()
Slim\Interfaces\RouteInterface::getArgument |
( |
|
$name, |
|
|
|
$default = null |
|
) |
| |
Retrieve a specific route argument.
- Parameters
-
string | $name | |
string | null | $default | |
- Returns
- string|null
Implemented in Slim\Route.
◆ getArguments()
Slim\Interfaces\RouteInterface::getArguments |
( |
| ) |
|
Get route arguments.
- Returns
- string[]
Implemented in Slim\Route.
◆ getName()
Slim\Interfaces\RouteInterface::getName |
( |
| ) |
|
Get route name.
- Returns
- null|string
Implemented in Slim\Route.
◆ getPattern()
Slim\Interfaces\RouteInterface::getPattern |
( |
| ) |
|
Get route pattern.
- Returns
- string
◆ prepare()
Prepare the route for use.
- Parameters
-
ServerRequestInterface | $request | |
array | $arguments | |
Implemented in Slim\Route.
◆ run()
Run route.
This method traverses the middleware stack, including the route's callable and captures the resultant HTTP response object. It then sends the response back to the Application.
- Parameters
-
ServerRequestInterface | $request | |
ResponseInterface | $response | |
- Returns
- ResponseInterface
Implemented in Slim\Route.
◆ setArgument()
Slim\Interfaces\RouteInterface::setArgument |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
Set a route argument.
- Parameters
-
- Returns
- self
◆ setArguments()
Slim\Interfaces\RouteInterface::setArguments |
( |
array |
$arguments | ) |
|
Replace route arguments.
- Parameters
-
- Returns
- self
◆ setName()
Slim\Interfaces\RouteInterface::setName |
( |
|
$name | ) |
|
Set route name.
- Parameters
-
- Returns
- static
- Exceptions
-
InvalidArgumentException | if the route name is not a string |
Implemented in Slim\Route.
◆ setOutputBuffering()
Slim\Interfaces\RouteInterface::setOutputBuffering |
( |
|
$mode | ) |
|
Set output buffering mode.
One of: false, 'prepend' or 'append'
- Parameters
-
- Exceptions
-
InvalidArgumentException | If an unknown buffering mode is specified |
Implemented in Slim\Route.
The documentation for this interface was generated from the following file: