|
static | get_path_for_callable (string|array|callable $callable, array $params=[], array $queryparams=[],) |
| Get the URI path for the specified callable.
|
|
static | get_route_instance_for_method (callable|array|string $callable) |
| Get the instance of the core\router\route attribute for the specified callable if one is available.
|
|
static | get_route_instance_for_request (ServerRequestInterface $request) |
| Get the route attribute for the specified request.
|
|
static | get_route_name_for_callable (callable|array|string $callable,) |
| Get the route name for the specified callable.
|
|
static | normalise_component_path (string $component,) |
| Normalise the component for use as part of the path.
|
|
static | redirect (ResponseInterface $response, string|url $url,) |
| Redirect to a URL.
|
|
static | redirect_to_callable (ServerRequestInterface $request, ResponseInterface $response, array|callable|string $callable, ?array $pathparams=null, ?array $queryparams=null, ?array $excludeparams=null,) |
| Redirect to the requested callable.
|
|
static | redirect_with_params (string|url $path, array $excludeparams=[],) |
| Redirect to the specified URL, carrying all parameters across too.
|
|
static | throw_page_not_found (ServerRequestInterface $request, ResponseInterface $response,) |
| Generate a Page Not Found result.
|
|
◆ get_path_for_callable()
static core\router\util::get_path_for_callable |
( |
string|array|callable | $callable, |
|
|
array | $params = [], |
|
|
array | $queryparams = [] ) |
|
static |
Get the URI path for the specified callable.
- Parameters
-
string | array | callable | $callable | the Callable to get the URI for |
array | $params | Any parameters to include in the path |
array | $queryparams | Any parameters to include in the query string |
- Return values
-
◆ get_route_instance_for_method()
static core\router\util::get_route_instance_for_method |
( |
callable|array|string | $callable | ) |
|
|
static |
Get the instance of the core\router\route attribute for the specified callable if one is available.
- Parameters
-
callable | array | string | $callable | |
- Return values
-
null|route | The route if one was found. |
◆ get_route_instance_for_request()
Get the route attribute for the specified request.
- Parameters
-
ServerRequestInterface | $request | |
- Return values
-
◆ get_route_name_for_callable()
static core\router\util::get_route_name_for_callable |
( |
callable|array|string | $callable | ) |
|
|
static |
Get the route name for the specified callable.
- Parameters
-
callable | array | string | $callable | |
- Return values
-
- Exceptions
-
coding_exception | If the callable could not be resolved into an Array format |
◆ normalise_component_path()
static core\router\util::normalise_component_path |
( |
string | $component | ) |
|
|
static |
Normalise the component for use as part of the path.
If the component is a subsystem, the core_
prefix will be removed. If the component is 'core', it will be kept. All other components will use their frankenstyle name.
- Parameters
-
- Return values
-
◆ redirect()
Redirect to a URL.
- Parameters
-
ResponseInterface | $response | |
string | url | $url | |
- Return values
-
◆ redirect_to_callable()
static core\router\util::redirect_to_callable |
( |
ServerRequestInterface | $request, |
|
|
ResponseInterface | $response, |
|
|
array|callable|string | $callable, |
|
|
?array | $pathparams = null, |
|
|
?array | $queryparams = null, |
|
|
?array | $excludeparams = null ) |
|
static |
Redirect to the requested callable.
- Parameters
-
ServerRequestInterface | $request | |
ResponseInterface | $response | |
array | callable | string | $callable | |
null | array | $pathparams | |
null | array | $queryparams | |
null | array | $excludeparams | A list of any parameters to remove the URI during the redirect |
- Return values
-
◆ redirect_with_params()
static core\router\util::redirect_with_params |
( |
string|url | $path, |
|
|
array | $excludeparams = [] ) |
|
static |
Redirect to the specified URL, carrying all parameters across too.
- Parameters
-
string | url | $path | |
array | $excludeparams | Any parameters to exclude from the query params @codeCoverageIgnore |
◆ throw_page_not_found()
Generate a Page Not Found result.
- Parameters
-
ServerRequestInterface | $request | |
ResponseInterface | $response | |
- Return values
-
- Exceptions
-
The documentation for this class was generated from the following file:
- lib/classes/router/util.php