Dispatcher
class Dispatcher (View source)
Dispatches requests to the controller which was specified by the request and returns the response the controller generated.
Properties
protected ObjectManagerInterface | $objectManager | ||
protected Context | $securityContext | ||
protected FirewallInterface | $firewall |
Methods
Inject the Object Manager through setter injection because property injection is not available during compile time.
Try processing the request until it is successfully marked "dispatched"
This signal is emitted directly before the request is being dispatched to a controller.
This signal is emitted directly after the request has been dispatched to a controller and the controller returned control back to the dispatcher.
Finds and instantiates a controller that matches the current request.
Details
void
injectObjectManager(ObjectManagerInterface $objectManager)
Inject the Object Manager through setter injection because property injection is not available during compile time.
injectSecurityContext(Context $context)
No description
injectFirewall(FirewallInterface $firewall)
No description
ResponseInterface
dispatch(ActionRequest $request)
Dispatches a request to a controller
protected ResponseInterface
initiateDispatchLoop(ActionRequest $request)
Try processing the request until it is successfully marked "dispatched"
protected void
emitBeforeControllerInvocation(ActionRequest $request, ControllerInterface $controller)
This signal is emitted directly before the request is being dispatched to a controller.
protected void
emitAfterControllerInvocation(ActionRequest $request, ResponseInterface|null $response, ControllerInterface $controller)
This signal is emitted directly after the request has been dispatched to a controller and the controller returned control back to the dispatcher.
protected ControllerInterface
resolveController(ActionRequest $request)
Finds and instantiates a controller that matches the current request.
If no controller can be found, an instance of NotFoundControllerInterface is returned.