CommandRequestHandler
class CommandRequestHandler implements RequestHandlerInterface (View source)
A request handler which can handle command line requests.
Properties
protected Bootstrap | $bootstrap | ||
protected ObjectManagerInterface | $objectManager | ||
protected Dispatcher | $dispatcher | ||
protected Request | $request | ||
protected Response | $response |
Methods
This request handler can handle CLI requests.
Returns the priority - how eager the handler is to actually handle the request.
Handles a command line request.
Checks if compile time command was not recognized as such, then runlevel was booted but it turned out that in fact the command is a compile time command.
Initializes the matching boot sequence depending on the type of the command (RUNLEVEL_RUNTIME or RUNLEVEL_COMPILETIME) and manually injects the necessary dependencies of this request handler.
Starts the shutdown sequence
Details
__construct(Bootstrap $bootstrap)
No description
mixed
canHandleRequest()
This request handler can handle CLI requests.
int
getPriority()
Returns the priority - how eager the handler is to actually handle the request.
void
handleRequest()
Handles a command line request.
While booting, the Object Manager is not yet available for retrieving the CommandExceptionHandler. For this purpose, possible occurring exceptions at this stage are caught manually and treated the same way the CommandExceptionHandler treats exceptions on itself anyways.
void
exitIfCompiletimeCommandWasNotCalledCorrectly(string $runlevel)
Checks if compile time command was not recognized as such, then runlevel was booted but it turned out that in fact the command is a compile time command.
This happens if the user doesn't specify the full command identifier.
protected void
boot(string $runlevel)
Initializes the matching boot sequence depending on the type of the command (RUNLEVEL_RUNTIME or RUNLEVEL_COMPILETIME) and manually injects the necessary dependencies of this request handler.
protected void
shutdown(string $runlevel)
Starts the shutdown sequence