TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Http\RequestHandler Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Http\RequestHandler:
TYPO3\CMS\Core\Http\RequestHandlerInterface

Public Member Functions

 __construct (Bootstrap $bootstrap)
 
 handleRequest (ServerRequestInterface $request)
 
 canHandleRequest (ServerRequestInterface $request)
 
 getPriority ()
 
- Public Member Functions inherited from TYPO3\CMS\Core\Http\RequestHandlerInterface
 handleRequest (\Psr\Http\Message\ServerRequestInterface $request)
 
 canHandleRequest (\Psr\Http\Message\ServerRequestInterface $request)
 

Protected Member Functions

 boot ($proceedIfNoUserIsLoggedIn)
 

Protected Attributes

 $bootstrap
 

Detailed Description

General RequestHandler for the TYPO3 Backend. This is used for all Backend requests except for CLI or AJAX calls. Unlike all other RequestHandlers in the TYPO3 CMS Core, the actual logic for choosing the controller is still done inside places like each single file. This RequestHandler here serves solely to check and set up all requirements needed for a TYPO3 Backend. This class might be changed in the future.

At first, this request handler serves as a replacement to typo3/init.php. It is called but does not exit so any typical script that is not dispatched, is just running through the handleRequest() method and then calls its own code.

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

The following get/post parameters are evaluated here:

  • route
  • token

Definition at line 43 of file RequestHandler.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Http\RequestHandler::__construct ( Bootstrap  $bootstrap)

Constructor handing over the bootstrap and the original request

Parameters
Bootstrap$bootstrap

Definition at line 56 of file RequestHandler.php.

References TYPO3\CMS\Backend\Http\RequestHandler\$bootstrap.

Member Function Documentation

◆ boot()

TYPO3\CMS\Backend\Http\RequestHandler::boot (   $proceedIfNoUserIsLoggedIn)
protected

Does the main work for setting up the backend environment for any Backend request

Parameters
bool$proceedIfNoUserIsLoggedInoption to allow to render the request even if no user is logged in
Returns
void

Definition at line 114 of file RequestHandler.php.

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

◆ canHandleRequest()

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

This request handler can handle any backend request (but not CLI).

Parameters
ServerRequestInterface$request
Returns
bool If the request is not a CLI script, TRUE otherwise FALSE

Definition at line 138 of file RequestHandler.php.

◆ getPriority()

TYPO3\CMS\Backend\Http\RequestHandler::getPriority ( )

Returns the priority - how eager the handler is to actually handle the request.

Returns
int The priority of the request handler.

Implements TYPO3\CMS\Core\Http\RequestHandlerInterface.

Definition at line 149 of file RequestHandler.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

◆ handleRequest()

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

Handles any backend request

Parameters
ServerRequestInterface$request
Returns
NULL|ResponseInterface

Definition at line 67 of file RequestHandler.php.

References TYPO3\CMS\Backend\Http\RequestHandler\boot(), TYPO3\CMS\Core\Utility\GeneralUtility\getIndpEnv(), and TYPO3\CMS\Core\Utility\HttpUtility\redirect().

Member Data Documentation

◆ $bootstrap

TYPO3\CMS\Backend\Http\RequestHandler::$bootstrap
protected