Psr7Router
- Full name:
\Qubus\Routing\Psr7Router
Methods
match
Match a given Request Url against stored routes converted into a Response.
public match(\Psr\Http\Message\ServerRequestInterface $serverRequest): \Psr\Http\Message\ResponseInterface
Parameters:
Parameter | Type | Description |
---|---|---|
$serverRequest | \Psr\Http\Message\ServerRequestInterface |
has
Check if a route exists based on its name.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | The name of the route. |
Return Value:
True if the named routed exists, false otherwise.
url
Generate url's from named routes.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | Name of the route. |
$params | array | Data parameters. |
Return Value:
The url.
Throws:
redirect
Redirect one route to another.
Parameters:
Parameter | Type | Description |
---|---|---|
$from | string | Originating route. |
$to | string | Destination route. |
$status | int | HTTP status code. |
Throws:
Automatically generated on 2025-10-13