TYPO3
7.6
|
Public Member Functions | |
__construct (Bootstrap $bootstrap) | |
handleRequest (InputInterface $input) | |
canHandleRequest (InputInterface $input) | |
getPriority () | |
Protected Member Functions | |
boot ($commandLineName) | |
validateCommandLineKeyFromInput (InputInterface $input) | |
getIncludeScriptByCommandLineKey ($cliKey) | |
loadCommandLineBackendUser ($commandLineName) | |
Protected Attributes | |
$bootstrap | |
Command Line Interface Request Handler dealing with "cliKey"-based Commands from the cli_dispatch.phpsh script. Picks up requests only when coming from the CLI mode. Resolves the "cliKey" which is registered inside $TYPO3_CONF_VARS[SC_OPTIONS][GLOBAL][cliKeys] and includes the CLI-based script or exits if no valid "cliKey" is found. Also logs into the system as a backend user which needs to be added to the database called _CLI_mymodule
Definition at line 31 of file CliRequestHandler.php.
__construct | ( | Bootstrap | $bootstrap | ) |
Constructor handing over the bootstrap
Bootstrap | $bootstrap |
Definition at line 44 of file CliRequestHandler.php.
References CliRequestHandler\$bootstrap.
|
protected |
Execute TYPO3 bootstrap
\RuntimeException | when the CLI user cannot be authenticated properly |
Definition at line 101 of file CliRequestHandler.php.
References GeneralUtility\flushOutputBuffers(), and CliRequestHandler\loadCommandLineBackendUser().
Referenced by CliRequestHandler\handleRequest().
canHandleRequest | ( | InputInterface | $input | ) |
This request handler can handle any CLI request.
InputInterface | $input |
Implements RequestHandlerInterface.
Definition at line 192 of file CliRequestHandler.php.
|
protected |
Define cli-related parameters and return the include script as well as the command line name. Used for authentication against the backend user in the "laodCommandLineBackendUser()" action.
string | $cliKey | the CLI key |
Definition at line 145 of file CliRequestHandler.php.
References $GLOBALS, and GeneralUtility\getFileAbsFileName().
Referenced by CliRequestHandler\handleRequest().
getPriority | ( | ) |
Returns the priority - how eager the handler is to actually handle the request.
Implements RequestHandlerInterface.
Definition at line 202 of file CliRequestHandler.php.
handleRequest | ( | InputInterface | $input | ) |
Handles any commandline request
InputInterface | $input |
Implements RequestHandlerInterface.
Definition at line 55 of file CliRequestHandler.php.
References $GLOBALS, CliRequestHandler\boot(), CliRequestHandler\getIncludeScriptByCommandLineKey(), GeneralUtility\makeInstance(), and CliRequestHandler\validateCommandLineKeyFromInput().
|
protected |
If the backend script is in CLI mode, it will try to load a backend user named by the CLI module name (in lowercase)
string | $commandLineName | the name of the module registered inside $TYPO3_CONF_VARS[SC_OPTIONS][GLOBAL][cliKeys] as second parameter |
\RuntimeException | if a non-admin Backend user could not be loaded |
Definition at line 168 of file CliRequestHandler.php.
References $GLOBALS, and StringUtility\beginsWith().
Referenced by CliRequestHandler\boot().
|
protected |
Check CLI parameters. First argument is a key that points to the script configuration. If it is not set or not valid, the script exits with an error message.
InputInterface | $input | an instance of the input given to the CLI call |
\InvalidArgumentException |
Definition at line 127 of file CliRequestHandler.php.
References $GLOBALS, elseif, and InputInterface\getFirstArgument().
Referenced by CliRequestHandler\handleRequest().
|
protected |
Definition at line 37 of file CliRequestHandler.php.
Referenced by CliRequestHandler\__construct().