‪TYPO3CMS  ‪main
TYPO3\CMS\Extbase\Mvc\Dispatcher Class Reference

Public Member Functions

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

Static Public Member Functions

static buildRequestFromCurrentRequestAndForwardResponse (RequestInterface $currentRequest, ForwardResponse $forwardResponse)
 

Protected Member Functions

Controller ControllerInterface resolveController (RequestInterface $request)
 

Protected Attributes

EventDispatcherInterface $eventDispatcher
 

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 35 of file Dispatcher.php.

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ buildRequestFromCurrentRequestAndForwardResponse()

◆ dispatch()

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
Exceptions
Exception

Definition at line 54 of file Dispatcher.php.

References 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 91 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 37 of file Dispatcher.php.

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

◆ $eventDispatcher

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

Definition at line 38 of file Dispatcher.php.

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