‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Http\RequestHandler Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Http\RequestHandler:

Public Member Functions

 __construct (RouteDispatcher $dispatcher, UriBuilder $uriBuilder, ListenerProvider $listenerProvider)
 
 handle (ServerRequestInterface $request)
 

Protected Member Functions

 resetGlobalsToCurrentRequest (ServerRequestInterface $request)
 

Protected Attributes

RouteDispatcher $dispatcher
 
UriBuilder $uriBuilder
 
ListenerProvider $listenerProvider
 

Detailed Description

General RequestHandler for the TYPO3 Backend. This is used for all Backend requests, including AJAX routes.

If a get/post parameter "route" is set, the Backend Routing is called and searches for a matching route inside the Router. The corresponding controller / action is called then which returns the response.

The following get/post parameters are evaluated here:

  • ‪route
  • ‪token

Definition at line 42 of file RequestHandler.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Http\RequestHandler::__construct ( RouteDispatcher  $dispatcher,
UriBuilder  $uriBuilder,
ListenerProvider  $listenerProvider 
)

Member Function Documentation

◆ handle()

TYPO3\CMS\Backend\Http\RequestHandler::handle ( ServerRequestInterface  $request)

Handles a backend request, after finishing running middlewares Dispatch the request to the appropriate controller through the Backend Dispatcher which resolves the routing

Definition at line 91 of file RequestHandler.php.

References TYPO3\CMS\Backend\Routing\RouteRedirect\createFromRoute(), and TYPO3\CMS\Backend\Http\RequestHandler\resetGlobalsToCurrentRequest().

◆ resetGlobalsToCurrentRequest()

TYPO3\CMS\Backend\Http\RequestHandler::resetGlobalsToCurrentRequest ( ServerRequestInterface  $request)
protected

Sets the global GET and POST to the values, so if people access $_GET and $_POST Within hooks starting NOW (e.g. cObject), they get the "enriched" data from query params.

This needs to be run after the request object has been enriched with modified GET/POST variables.

Parameters
ServerRequestInterface$request

this safety net will be removed in TYPO3 v11.0.

Definition at line 69 of file RequestHandler.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Http\RequestHandler\handle().

Member Data Documentation

◆ $dispatcher

RouteDispatcher TYPO3\CMS\Backend\Http\RequestHandler::$dispatcher
protected

◆ $listenerProvider

ListenerProvider TYPO3\CMS\Backend\Http\RequestHandler::$listenerProvider
protected

◆ $uriBuilder

UriBuilder TYPO3\CMS\Backend\Http\RequestHandler::$uriBuilder
protected