‪TYPO3CMS  10.4
TYPO3\CMS\Core\Routing\PageUriMatcher Class Reference

Public Member Functions

array match (string $urlPath)
 

Public Attributes

$this mappableProcessor = new MappableProcessor()
 

Protected Member Functions

array matchCollection (string $urlPath, RouteCollection $routes)
 
string null getDecoratedRoutePath (Route $route)
 
array getAttributes (Route $route, string $name, array $attributes)
 
array mergeDefaults (array $params, array $defaults)
 

Protected Attributes

RouteCollection< string, $routes;protected MappableProcessor $mappableProcessor;public function __construct(RouteCollection $routes) { $this-> routes = $routes
 

Detailed Description

Internal class, which is similar to Symfony's Urlmatcher but without validating

  • ‪conditions / expression language
  • ‪host matches
  • ‪method checks because this method only works in conjunction with PageRouter.

Definition at line 32 of file PageUriMatcher.php.

Member Function Documentation

◆ getAttributes()

array TYPO3\CMS\Core\Routing\PageUriMatcher::getAttributes ( Route  $route,
string  $name,
array  $attributes 
)
protected

Returns an array of values to use as request attributes.

As this method requires the Route object, it is not available in matchers that do not have access to the matched Route instance (like the PHP and Apache matcher dumpers).

Parameters
Route$route‪The route we are matching against
string$name‪The name of the route
array$attributes‪An array of attributes from the matcher
Returns
‪array An array of parameters

Definition at line 126 of file PageUriMatcher.php.

References TYPO3\CMS\Core\Routing\PageUriMatcher\mergeDefaults().

Referenced by TYPO3\CMS\Core\Routing\PageUriMatcher\matchCollection().

◆ getDecoratedRoutePath()

string null TYPO3\CMS\Core\Routing\PageUriMatcher::getDecoratedRoutePath ( Route  $route)
protected

Resolves an optional route specific decorated route path that has been assigned by DecoratingEnhancerInterface instances.

Parameters
Route$route
Returns
‪string|null

Definition at line 105 of file PageUriMatcher.php.

Referenced by TYPO3\CMS\Core\Routing\PageUriMatcher\matchCollection().

◆ match()

array TYPO3\CMS\Core\Routing\PageUriMatcher::match ( string  $urlPath)

Matches a path segment against the route collection

Parameters
string$urlPath
Returns
‪array
Exceptions
ResourceNotFoundException

Definition at line 55 of file PageUriMatcher.php.

References TYPO3\CMS\Core\Routing\PageUriMatcher\matchCollection(), and TYPO3\CMS\Core\Routing\PageUriMatcher\routes.

◆ matchCollection()

array TYPO3\CMS\Core\Routing\PageUriMatcher::matchCollection ( string  $urlPath,
RouteCollection  $routes 
)
protected

Tries to match a URL with a set of routes.

Parameters
string$urlPath‪The path info to be parsed
RouteCollection<string,Route>‪$routes The set of routes
Returns
‪array An array of parameters

Definition at line 73 of file PageUriMatcher.php.

References TYPO3\CMS\Core\Routing\PageUriMatcher\getAttributes(), TYPO3\CMS\Core\Routing\PageUriMatcher\getDecoratedRoutePath(), and TYPO3\CMS\Core\Routing\PageUriMatcher\mappableProcessor.

Referenced by TYPO3\CMS\Core\Routing\PageUriMatcher\match().

◆ mergeDefaults()

array TYPO3\CMS\Core\Routing\PageUriMatcher::mergeDefaults ( array  $params,
array  $defaults 
)
protected

Get merged default parameters.

Parameters
array$params‪The parameters
array$defaults‪The defaults
Returns
‪array Merged default parameters

Definition at line 150 of file PageUriMatcher.php.

Referenced by TYPO3\CMS\Core\Routing\PageUriMatcher\getAttributes().

Member Data Documentation

◆ mappableProcessor

$this TYPO3\CMS\Core\Routing\PageUriMatcher::mappableProcessor = new MappableProcessor()

◆ routes

RouteCollection<string, $routes; protected MappableProcessor $mappableProcessor; public function __construct(RouteCollection $routes) { $this-> TYPO3\CMS\Core\Routing\PageUriMatcher::routes = $routes
protected

Route>

Definition at line 44 of file PageUriMatcher.php.

Referenced by TYPO3\CMS\Core\Routing\PageUriMatcher\match().