‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Http\RouteDispatcher Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Http\RouteDispatcher:
TYPO3\CMS\Core\Http\Dispatcher TYPO3\CMS\Core\Http\DispatcherInterface

Public Member Functions

ResponseInterface dispatch (ServerRequestInterface $request)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Http\Dispatcher
 __construct (ContainerInterface $container)
 

Protected Member Functions

TYPO3 CMS Core FormProtection AbstractFormProtection getFormProtection ()
 
ResponseInterface null enforceReferrer (ServerRequestInterface $request)
 
bool isValidRequest ($request)
 
 addAndValidateModuleConfiguration (ServerRequestInterface $request, Route $route)
 
array getModuleConfiguration ($moduleName)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Http\Dispatcher
callable getCallableFromTarget ($target)
 

Additional Inherited Members

- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Http\Dispatcher
ContainerInterface $container
 

Detailed Description

Dispatcher which resolves a route to call a controller and method (but also a callable)

Definition at line 35 of file RouteDispatcher.php.

Member Function Documentation

◆ addAndValidateModuleConfiguration()

TYPO3\CMS\Backend\Http\RouteDispatcher::addAndValidateModuleConfiguration ( ServerRequestInterface  $request,
Route  $route 
)
protected

◆ dispatch()

ResponseInterface TYPO3\CMS\Backend\Http\RouteDispatcher::dispatch ( ServerRequestInterface  $request)

Main method to resolve the route and checks the target of the route, and tries to call it.

Parameters
ServerRequestInterface$request‪the current server request
Returns
‪ResponseInterface the filled response by the callable / controller/action
Exceptions
InvalidRequestTokenException‪if the route was not found

Reimplemented from TYPO3\CMS\Core\Http\Dispatcher.

Definition at line 45 of file RouteDispatcher.php.

References TYPO3\CMS\Backend\Http\RouteDispatcher\addAndValidateModuleConfiguration(), TYPO3\CMS\Backend\Http\RouteDispatcher\enforceReferrer(), TYPO3\CMS\Core\Http\Dispatcher\getCallableFromTarget(), and TYPO3\CMS\Backend\Http\RouteDispatcher\isValidRequest().

◆ enforceReferrer()

ResponseInterface null TYPO3\CMS\Backend\Http\RouteDispatcher::enforceReferrer ( ServerRequestInterface  $request)
protected

Evaluates HTTP Referer header (which is denied by client to be a custom value) - attempts to ensure the value is given using a HTML client refresh. see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface|null

Definition at line 87 of file RouteDispatcher.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Http\RouteDispatcher\dispatch().

◆ getFormProtection()

TYPO3 CMS Core FormProtection AbstractFormProtection TYPO3\CMS\Backend\Http\RouteDispatcher::getFormProtection ( )
protected

Wrapper method for static form protection utility

Returns
‪\TYPO3\CMS\Core\FormProtection\AbstractFormProtection

Definition at line 74 of file RouteDispatcher.php.

References TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get().

Referenced by TYPO3\CMS\Backend\Http\RouteDispatcher\isValidRequest().

◆ getModuleConfiguration()

array TYPO3\CMS\Backend\Http\RouteDispatcher::getModuleConfiguration (   $moduleName)
protected

Returns the module configuration which is provided during module registration

Parameters
string$moduleName
Returns
‪array
Exceptions

Definition at line 170 of file RouteDispatcher.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Http\RouteDispatcher\addAndValidateModuleConfiguration().

◆ isValidRequest()

bool TYPO3\CMS\Backend\Http\RouteDispatcher::isValidRequest (   $request)
protected

Checks if the request token is valid. This is checked to see if the route is really created by the same instance. Should be called for all routes in the backend except for the ones that don't require a login.

Parameters
\Psr\Http\Message\ServerRequestInterface$request
Returns
‪bool
See also
‪\TYPO3\CMS\Backend\Routing\UriBuilder where the token is generated.

Definition at line 117 of file RouteDispatcher.php.

References TYPO3\CMS\Backend\Http\RouteDispatcher\getFormProtection().

Referenced by TYPO3\CMS\Backend\Http\RouteDispatcher\dispatch().