TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
Dispatcher Class Reference
Inheritance diagram for Dispatcher:
DispatcherInterface RouteDispatcher

Public Member Functions

 dispatch (ServerRequestInterface $request, ResponseInterface $response)
 

Protected Member Functions

 getCallableFromTarget ($target)
 

Detailed Description

Dispatcher which resolves a target, which was given to the request to call a controller and method (but also a callable) where the request contains a "target" as attribute.

Used in eID Frontend Requests, see EidRequestHandler

Definition at line 27 of file core/Classes/Http/Dispatcher.php.

Member Function Documentation

dispatch ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

Main method that fetches the target from the request and calls the target directly

Parameters
ServerRequestInterface$requestthe current server request
ResponseInterface$responsethe prepared response
Returns
ResponseInterface the filled response by the callable / controller/action
Exceptions
\InvalidArgumentExceptionif the defined target is invalid

Implements DispatcherInterface.

Definition at line 37 of file core/Classes/Http/Dispatcher.php.

References ServerRequestInterface\getAttribute(), and Dispatcher\getCallableFromTarget().

getCallableFromTarget (   $target)
protected

Creates a callable out of the given parameter, which can be a string, a callable / closure or an array which can be handed to call_user_func_array()

Parameters
array | string | callable$targetthe target which is being resolved.
Returns
callable
Exceptions
\InvalidArgumentException

Definition at line 52 of file core/Classes/Http/Dispatcher.php.

References GeneralUtility\makeInstance().

Referenced by Dispatcher\dispatch().