ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Slim\Interfaces\RouteInterface Interface Reference
+ Inheritance diagram for Slim\Interfaces\RouteInterface:
+ Collaboration diagram for Slim\Interfaces\RouteInterface:

Public Member Functions

 getArgument ($name, $default=null)
 Retrieve a specific route argument. More...
 
 getArguments ()
 Get route arguments. More...
 
 getName ()
 Get route name. More...
 
 getPattern ()
 Get route pattern. More...
 
 setArgument ($name, $value)
 Set a route argument. More...
 
 setArguments (array $arguments)
 Replace route arguments. More...
 
 setOutputBuffering ($mode)
 Set output buffering mode. More...
 
 setName ($name)
 Set route name. More...
 
 add ($callable)
 Add middleware. More...
 
 prepare (ServerRequestInterface $request, array $arguments)
 Prepare the route for use. More...
 
 run (ServerRequestInterface $request, ResponseInterface $response)
 Run route. More...
 
 __invoke (ServerRequestInterface $request, ResponseInterface $response)
 Dispatch route callable against current Request and Response objects. More...
 

Detailed Description

Definition at line 21 of file RouteInterface.php.

Member Function Documentation

◆ __invoke()

Slim\Interfaces\RouteInterface::__invoke ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

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$requestThe current Request object
ResponseInterface$responseThe 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$callableThe 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()

Slim\Interfaces\RouteInterface::prepare ( ServerRequestInterface  $request,
array  $arguments 
)

Prepare the route for use.

Parameters
ServerRequestInterface$request
array$arguments

Implemented in Slim\Route.

◆ run()

Slim\Interfaces\RouteInterface::run ( ServerRequestInterface  $request,
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
ServerRequestInterface$request
ResponseInterface$response
Returns
ResponseInterface

Implemented in Slim\Route.

◆ setArgument()

Slim\Interfaces\RouteInterface::setArgument (   $name,
  $value 
)

Set a route argument.

Parameters
string$name
string$value
Returns
self

◆ setArguments()

Slim\Interfaces\RouteInterface::setArguments ( array  $arguments)

Replace route arguments.

Parameters
string[]$arguments
Returns
self

◆ setName()

Slim\Interfaces\RouteInterface::setName (   $name)

Set route name.

Parameters
string$name
Returns
static
Exceptions
InvalidArgumentExceptionif 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
boolean | string$mode
Exceptions
InvalidArgumentExceptionIf an unknown buffering mode is specified

Implemented in Slim\Route.


The documentation for this interface was generated from the following file: