‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Routing\RouterInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Core\Routing\RouterInterface:

Public Member Functions

 matchRequest (ServerRequestInterface $request, RouteResultInterface $previousResult=null)
 generateUri ($route, array $parameters=[], string $fragment='', string $type=self::ABSOLUTE_URL)

Public Attributes

const ABSOLUTE_URL = 'url'
const ABSOLUTE_PATH = 'absolute'

Detailed Description

Base Router to be used all over the TYPO3 Core. Its base lies around PSR-7 requests + URIs, and special "RouteResult" objects.

Definition at line 27 of file RouterInterface.php.

Member Function Documentation

◆ generateUri()

TYPO3\CMS\Core\Routing\RouterInterface::generateUri (   $route,
array  $parameters = [],
string  $fragment = '',
string  $type = self::ABSOLUTE_URL 

Builds a URI based on the $route and the given parameters.

string | array | int | \ArrayAccess$route‪either the route name, or for pages it is usually the array of a page record, or the page ID
array$parameters‪query parameters, specially reserved parameters are usually prefixed with "_"
string$fragment‪the section/fragment www.example.com/page/#fragment, WITHOUT the hash
string$type‪see the constants above.

◆ matchRequest()

TYPO3\CMS\Core\Routing\RouterInterface::matchRequest ( ServerRequestInterface  $request,
RouteResultInterface  $previousResult = null 
RouteResultInterface | null$previousResult

Implemented in TYPO3\CMS\Core\Routing\PageRouter.

Member Data Documentation


const TYPO3\CMS\Core\Routing\RouterInterface::ABSOLUTE_PATH = 'absolute'

Generates an absolute path

Definition at line 37 of file RouterInterface.php.

Referenced by TYPO3\CMS\Frontend\Typolink\PageLinkBuilder\generateUrlForPageWithSiteConfiguration().