RouterInterface
Base Router to be used all over the TYPO3 Core. Its base lies around PSR-7 requests + URIs, and special "RouteResult" objects.
Table of Contents
Constants
- ABSOLUTE_PATH = 'absolute'
- Generates an absolute path
- ABSOLUTE_URL = 'url'
- Generates an absolute URL
Methods
- generateUri() : UriInterface
- Builds a URI based on the $route and the given parameters.
- matchRequest() : RouteResultInterface
Constants
ABSOLUTE_PATH
Generates an absolute path
public
mixed
ABSOLUTE_PATH
= 'absolute'
ABSOLUTE_URL
Generates an absolute URL
public
mixed
ABSOLUTE_URL
= 'url'
Methods
generateUri()
Builds a URI based on the $route and the given parameters.
public
generateUri(string|array<string|int, mixed>|int|ArrayAccess $route[, array<string|int, mixed> $parameters = [] ][, string $fragment = '' ][, string $type = self::ABSOLUTE_URL ]) : UriInterface
Parameters
- $route : string|array<string|int, mixed>|int|ArrayAccess
-
either the route name, or for pages it is usually the array of a page record, or the page ID
- $parameters : array<string|int, mixed> = []
-
query parameters, specially reserved parameters are usually prefixed with "_"
- $fragment : string = ''
-
the section/fragment www.example.com/page/#fragment, WITHOUT the hash
- $type : string = self::ABSOLUTE_URL
-
see the constants above.
Return values
UriInterfacematchRequest()
public
matchRequest(ServerRequestInterface $request[, RouteResultInterface|null $previousResult = null ]) : RouteResultInterface
Parameters
- $request : ServerRequestInterface
- $previousResult : RouteResultInterface|null = null