‪TYPO3CMS  ‪main
TYPO3\CMS\Frontend\Middleware\StaticRouteResolver Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\Middleware\StaticRouteResolver:

Public Member Functions

 __construct (protected readonly RequestFactory $requestFactory, protected readonly LinkService $linkService)
 process (ServerRequestInterface $request, RequestHandlerInterface $handler)

Protected Member Functions

array null getApplicableStaticRoute (array $staticRouteConfiguration, Site $site, string $uriPath)
 getFromFile (File $file)
 getFromUri (string $uri)
 getPageUri (ServerRequestInterface $request, Site $site, array $urlParams)
 resolveByType (ServerRequestInterface $request, Site $site, string $type, array $routeConfig)

Detailed Description

Resolves static routes - can return configured content directly or load content from file / urls

Definition at line 36 of file StaticRouteResolver.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Frontend\Middleware\StaticRouteResolver::__construct ( protected readonly RequestFactory  $requestFactory,
protected readonly LinkService  $linkService 

Definition at line 38 of file StaticRouteResolver.php.

Member Function Documentation

◆ getApplicableStaticRoute()

array null TYPO3\CMS\Frontend\Middleware\StaticRouteResolver::getApplicableStaticRoute ( array  $staticRouteConfiguration,
Site  $site,
string  $uriPath 

Find the proper configuration for the static route in the static route configuration. Mainly:

  • ‪needs to have a valid "route" property
  • ‪needs to have a "type"
array$staticRouteConfiguration‪the "routes" part of the site configuration
Site$site‪the current site where the configuration is based on
string$uriPath‪the path of the current request - used to match the "route" value of a single static route
‪array|null the configuration for the static route that matches, or null if no route is given

Definition at line 76 of file StaticRouteResolver.php.

References TYPO3\CMS\Core\Site\Entity\Site\getBase().

Referenced by TYPO3\CMS\Frontend\Middleware\StaticRouteResolver\process().

◆ getFromFile()

TYPO3\CMS\Frontend\Middleware\StaticRouteResolver::getFromFile ( File  $file)

◆ getFromUri()

TYPO3\CMS\Frontend\Middleware\StaticRouteResolver::getFromUri ( string  $uri)

◆ getPageUri()

TYPO3\CMS\Frontend\Middleware\StaticRouteResolver::getPageUri ( ServerRequestInterface  $request,
Site  $site,
array  $urlParams 

◆ process()

TYPO3\CMS\Frontend\Middleware\StaticRouteResolver::process ( ServerRequestInterface  $request,
RequestHandlerInterface  $handler 

◆ resolveByType()

TYPO3\CMS\Frontend\Middleware\StaticRouteResolver::resolveByType ( ServerRequestInterface  $request,
Site  $site,
string  $type,
array  $routeConfig