TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RequestHandler Class Reference
Inheritance diagram for RequestHandler:
RequestHandlerInterface

Public Member Functions

 __construct (Bootstrap $bootstrap)
 
 handleRequest (ServerRequestInterface $request)
 
 canHandleRequest (ServerRequestInterface $request)
 
 getPriority ()
 
- Public Member Functions inherited from 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:

Definition at line 43 of file backend/Classes/Http/RequestHandler.php.

Constructor & Destructor Documentation

__construct ( Bootstrap  $bootstrap)

Constructor handing over the bootstrap and the original request

Parameters
Bootstrap$bootstrap

Definition at line 56 of file backend/Classes/Http/RequestHandler.php.

References RequestHandler\$bootstrap.

Member Function Documentation

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 107 of file backend/Classes/Http/RequestHandler.php.

Referenced by RequestHandler\handleRequest().

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 131 of file backend/Classes/Http/RequestHandler.php.

getPriority ( )

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

Returns
int The priority of the request handler.

Implements RequestHandlerInterface.

Definition at line 142 of file backend/Classes/Http/RequestHandler.php.

handleRequest ( ServerRequestInterface  $request)

Handles any backend request

Parameters
ServerRequestInterface$request
Returns
NULL|ResponseInterface

Definition at line 67 of file backend/Classes/Http/RequestHandler.php.

References RequestHandler\boot(), GeneralUtility\getIndpEnv(), ServerRequestInterface\getQueryParams(), RequestInterface\getUri(), and ServerRequestInterface\withAttribute().

Member Data Documentation

$bootstrap
protected

Definition at line 49 of file backend/Classes/Http/RequestHandler.php.

Referenced by RequestHandler\__construct().