‪TYPO3CMS  10.4
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)
 
 dispatch (RequestInterface $request, ResponseInterface $response)
 

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 34 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 59 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

◆ dispatch()

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

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

Parameters
RequestInterface$request‪The request to dispatch
ResponseInterface$response‪The response, to be modified by the controller
Exceptions
Exception

Definition at line 76 of file Dispatcher.php.

References TYPO3\CMS\Extbase\Mvc\RequestInterface\isDispatched(), 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 101 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 42 of file Dispatcher.php.

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

◆ $eventDispatcher

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

Definition at line 46 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

Definition at line 38 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 50 of file Dispatcher.php.