PHP Class Neos\Flow\Cli\CommandRequestHandler

Inheritance: implements Neos\Flow\Core\RequestHandlerInterface
Datei anzeigen Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$bootstrap Neos\Flow\Core\Bootstrap
$dispatcher Neos\Flow\Mvc\Dispatcher
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$request Request
$response Response

Public Methods

Method Description
__construct ( Bootstrap $bootstrap )
canHandleRequest ( ) : boolean This request handler can handle CLI requests.
exitIfCompiletimeCommandWasNotCalledCorrectly ( string $runlevel ) : void 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.
getPriority ( ) : integer Returns the priority - how eager the handler is to actually handle the request.
handleRequest ( ) : void Handles a command line request.

Protected Methods

Method Description
boot ( string $runlevel ) : void 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.
shutdown ( string $runlevel ) : void Starts the shutdown sequence

Method Details

__construct() public method

public __construct ( Bootstrap $bootstrap )
$bootstrap Neos\Flow\Core\Bootstrap

boot() protected method

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 boot ( string $runlevel ) : void
$runlevel string one of the Bootstrap::RUNLEVEL_* constants
return void

canHandleRequest() public method

This request handler can handle CLI requests.
public canHandleRequest ( ) : boolean
return boolean If the request is a CLI request, TRUE otherwise FALSE

exitIfCompiletimeCommandWasNotCalledCorrectly() public method

This happens if the user doesn't specify the full command identifier.
public exitIfCompiletimeCommandWasNotCalledCorrectly ( string $runlevel ) : void
$runlevel string one of the Bootstrap::RUNLEVEL_* constants
return void

getPriority() public method

Returns the priority - how eager the handler is to actually handle the request.
public getPriority ( ) : integer
return integer The priority of the request handler.

handleRequest() public method

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.
public handleRequest ( ) : void
return void

shutdown() protected method

Starts the shutdown sequence
protected shutdown ( string $runlevel ) : void
$runlevel string one of the Bootstrap::RUNLEVEL_* constants
return void

Property Details

$bootstrap protected_oe property

protected Bootstrap,Neos\Flow\Core $bootstrap
return Neos\Flow\Core\Bootstrap

$dispatcher protected_oe property

protected Dispatcher,Neos\Flow\Mvc $dispatcher
return Neos\Flow\Mvc\Dispatcher

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface

$request protected_oe property

protected Request,Neos\Flow\Cli $request
return Request

$response protected_oe property

protected Response,Neos\Flow\Cli $response
return Response