‪TYPO3CMS  11.5
TYPO3\CMS\Extbase\Mvc\Dispatcher Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\Dispatcher:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct (ObjectManagerInterface $objectManager, ContainerInterface $container, EventDispatcherInterface $eventDispatcher)
 
ResponseInterface dispatch (RequestInterface $request)
 

Static Public Member Functions

static buildRequestFromCurrentRequestAndForwardResponse (Request $currentRequest, ForwardResponse $forwardResponse)
 

Protected Member Functions

Controller ControllerInterface resolveController (RequestInterface $request)
 

Protected Attributes

ObjectManagerInterface $objectManager
 
EventDispatcherInterface $eventDispatcher
 
array $settings = array( )
 

Private Attributes

ContainerInterface $container
 

Detailed Description

Dispatches requests to the controller which was specified by the request and returns the response the controller generated.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 37 of file Dispatcher.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Mvc\Dispatcher::__construct ( ObjectManagerInterface  $objectManager,
ContainerInterface  $container,
EventDispatcherInterface  $eventDispatcher 
)

Constructs the global dispatcher

Parameters
ObjectManagerInterface$objectManager‪A reference to the object manager
ContainerInterface$container
EventDispatcherInterface$eventDispatcher

Definition at line 63 of file Dispatcher.php.

References TYPO3\CMS\Extbase\Mvc\Dispatcher\$container, TYPO3\CMS\Extbase\Mvc\Dispatcher\$eventDispatcher, and TYPO3\CMS\Extbase\Mvc\Dispatcher\$objectManager.

Member Function Documentation

◆ buildRequestFromCurrentRequestAndForwardResponse()

◆ dispatch()

ResponseInterface TYPO3\CMS\Extbase\Mvc\Dispatcher::dispatch ( RequestInterface  $request)

Dispatches a request to a controller and initializes the security framework.

Parameters
RequestInterface$request‪The request to dispatch
Returns
‪ResponseInterface
Exceptions
Exception

Definition at line 81 of file Dispatcher.php.

References TYPO3\CMS\Extbase\Mvc\Exception\StopActionException\getResponse(), and TYPO3\CMS\Extbase\Mvc\Dispatcher\resolveController().

◆ resolveController()

Controller ControllerInterface TYPO3\CMS\Extbase\Mvc\Dispatcher::resolveController ( RequestInterface  $request)
protected

Finds and instantiates a controller that matches the current request. If no controller can be found, an instance of NotFoundControllerInterface is returned.

Parameters
RequestInterface$request‪The request to dispatch
Returns
Controller\ControllerInterface
Exceptions
Exception

Definition at line 125 of file Dispatcher.php.

References TYPO3\CMS\Extbase\Mvc\RequestInterface\getControllerObjectName().

Referenced by TYPO3\CMS\Extbase\Mvc\Dispatcher\dispatch().

Member Data Documentation

◆ $container

ContainerInterface TYPO3\CMS\Extbase\Mvc\Dispatcher::$container
private

Definition at line 46 of file Dispatcher.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Dispatcher\__construct().

◆ $eventDispatcher

EventDispatcherInterface TYPO3\CMS\Extbase\Mvc\Dispatcher::$eventDispatcher
protected

Definition at line 50 of file Dispatcher.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Dispatcher\__construct().

◆ $objectManager

ObjectManagerInterface TYPO3\CMS\Extbase\Mvc\Dispatcher::$objectManager
protected

A reference to the object manager

Deprecated:
‪since v11, will be removed in v12

Definition at line 42 of file Dispatcher.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Dispatcher\__construct().

◆ $settings

array TYPO3\CMS\Extbase\Mvc\Dispatcher::$settings = array( )
protected

Definition at line 54 of file Dispatcher.php.