public
string|null
|
#
getArgument( string $name, string|null $default = null )
Retrieve a specific route argument
Retrieve a specific route argument
Parameters
Returns
string|null
|
public
string[]
|
|
public
null|string
|
#
getName( )
Get route name
Returns
null|string
|
public
string
|
|
public
Slim\Interfaces\RouteInterface
|
#
setArgument( string $name, string $value )
Set a route argument
Parameters
Returns
|
public
Slim\Interfaces\RouteInterface
|
#
setArguments( array $arguments )
Replace route arguments
Parameters
Returns
|
public
|
#
setOutputBuffering( boolean|string $mode )
Set output buffering mode
Set output buffering mode
One of: false, 'prepend' or 'append'
Parameters
Throws
InvalidArgumentException If an unknown buffering mode is specified
|
public
static
|
#
setName( string $name )
Set route name
Parameters
Returns
static
Throws
InvalidArgumentException if the route name is not a string
|
public
Slim\Interfaces\RouteInterface
|
#
add( callable|string $callable )
Add middleware
This method prepends new middleware to the route's middleware stack.
Parameters
- $callable
- The callback routine
Returns
|
public
|
#
prepare( Psr\Http\Message\ServerRequestInterface $request, array $arguments )
Prepare the route for use
Prepare the route for use
Parameters
|
public
Psr\Http\Message\ResponseInterface
|
#
run( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response )
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
Returns
Psr\Http\Message\ResponseInterface
|
public
Psr\Http\Message\ResponseInterface
|
#
__invoke( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response )
Dispatch route callable against current Request and Response objects
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
- $request
- The current Request object
- $response
- The current Response object
Returns
Psr\Http\Message\ResponseInterface
|