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

Public Member Functions

 __construct (ContainerInterface $container)
 
ResponseInterface dispatch (ServerRequestInterface $request)
 

Protected Member Functions

callable getCallableFromTarget ($target)
 

Protected Attributes

ContainerInterface $container
 

Detailed Description

Dispatcher which resolves a target, which was given to the request to call a controller and method (but also a callable) where the request contains a "target" as attribute.

Used in eID Frontend Requests, see EidHandler

Definition at line 29 of file Dispatcher.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Http\Dispatcher::__construct ( ContainerInterface  $container)

Definition at line 35 of file Dispatcher.php.

References TYPO3\CMS\Core\Http\Dispatcher\$container.

Member Function Documentation

◆ dispatch()

ResponseInterface TYPO3\CMS\Core\Http\Dispatcher::dispatch ( ServerRequestInterface  $request)

Main method that fetches the target from the request and calls the target directly

Parameters
ServerRequestInterface$request‪the current server request
Returns
‪ResponseInterface the filled response by the callable/controller/action
Exceptions

Implements TYPO3\CMS\Core\Http\DispatcherInterface.

Reimplemented in TYPO3\CMS\Backend\Http\RouteDispatcher.

Definition at line 47 of file Dispatcher.php.

References TYPO3\CMS\Core\Http\Dispatcher\getCallableFromTarget().

◆ getCallableFromTarget()

callable TYPO3\CMS\Core\Http\Dispatcher::getCallableFromTarget (   $target)
protected

Creates a callable out of the given parameter, which can be a string, a callable / closure or an array which can be handed to call_user_func_array()

Parameters
array | string | callable$target‪the target which is being resolved.
Returns
‪callable
Exceptions

Definition at line 63 of file Dispatcher.php.

Referenced by TYPO3\CMS\Backend\Http\RouteDispatcher\dispatch(), and TYPO3\CMS\Core\Http\Dispatcher\dispatch().

Member Data Documentation

◆ $container

ContainerInterface TYPO3\CMS\Core\Http\Dispatcher::$container
protected

Definition at line 33 of file Dispatcher.php.

Referenced by TYPO3\CMS\Core\Http\Dispatcher\__construct().