![]() |
TYPO3
7.6
|
Public Member Functions | |
injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) | |
injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) | |
canProcessRequest (\TYPO3\CMS\Extbase\Mvc\RequestInterface $request) | |
processRequest (RequestInterface $request, ResponseInterface $response) | |
Protected Member Functions | |
resolveCommandMethodName () | |
initializeCommandMethodArguments () | |
forward ($commandName, $controllerObjectName=null, array $arguments=array()) | |
ensureAdminRoleIfRequested () | |
restoreUserRole ($originalRole) | |
output ($text, array $arguments=array()) | |
outputLine ($text= '', array $arguments=array()) | |
outputFormatted ($text= '', array $arguments=array(), $leftPadding=0) | |
quit ($exitCode=0) | |
sendAndExit ($exitCode=0) | |
Protected Attributes | |
$request | |
$response | |
$arguments | |
$commandMethodName = '' | |
$requestAdminPermissions = false | |
$userAuthentication | |
$reflectionService | |
$objectManager | |
$output | |
A controller which processes requests from the command line
http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
Definition at line 34 of file CommandController.php.
canProcessRequest | ( | \TYPO3\CMS\Extbase\Mvc\RequestInterface | $request | ) |
Checks if the current request type is supported by the controller.
\TYPO3\CMS\Extbase\Mvc\RequestInterface | $request | The current request |
Implements ControllerInterface.
Definition at line 112 of file CommandController.php.
Referenced by CommandController\processRequest().
|
protected |
Set admin permissions for currently authenticated user if requested and returns the original state or NULL
Definition at line 272 of file CommandController.php.
|
protected |
Forwards the request to another command and / or CommandController.
Request is directly transferred to the other command / controller without the need for a new request.
string | $commandName | |
string | $controllerObjectName | |
array | $arguments |
StopActionException |
Definition at line 227 of file CommandController.php.
References CommandController\$arguments.
|
protected |
Initializes the arguments array of this controller by creating an empty argument object for each of the method arguments found in the designated command method.
\TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentTypeException |
InvalidArgumentTypeException |
Definition at line 169 of file CommandController.php.
References elseif.
Referenced by CommandController\processRequest().
injectObjectManager | ( | \TYPO3\CMS\Extbase\Object\ObjectManagerInterface | $objectManager | ) |
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface | $objectManager |
Definition at line 90 of file CommandController.php.
References $GLOBALS, CommandController\$objectManager, and CommandController\output().
injectReflectionService | ( | \TYPO3\CMS\Extbase\Reflection\ReflectionService | $reflectionService | ) |
\TYPO3\CMS\Extbase\Reflection\ReflectionService | $reflectionService |
Definition at line 101 of file CommandController.php.
References CommandController\$reflectionService.
|
protected |
Outputs specified text to the console window You can specify arguments that will be passed to the text via sprintf
string | $text | Text to output |
array | $arguments | Optional arguments to use for sprintf |
Definition at line 303 of file CommandController.php.
References CommandController\$arguments.
Referenced by HelpCommandController\displayHelpForCommand(), HelpCommandController\displayHelpIndex(), ExtensionCommandController\dumpClassLoadingInformationCommand(), CommandController\injectObjectManager(), CommandController\outputFormatted(), and CommandController\outputLine().
|
protected |
Formats the given text to fit into MAXIMUM_LINE_LENGTH and outputs it to the console window
string | $text | Text to output |
array | $arguments | Optional arguments to use for sprintf |
int | $leftPadding | The number of spaces to use for indentation |
Definition at line 331 of file CommandController.php.
References CommandController\$arguments, and CommandController\output().
|
protected |
Outputs specified text to the console window and appends a line break
string | $text | Text to output |
array | $arguments | Optional arguments to use for sprintf |
Definition at line 316 of file CommandController.php.
References CommandController\$arguments, and CommandController\output().
Referenced by HelpCommandController\displayHelpForCommand(), HelpCommandController\displayHelpIndex(), HelpCommandController\errorCommand(), HelpCommandController\helpCommand(), and HelpCommandController\helpStubCommand().
processRequest | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
Processes a command line request.
RequestInterface | $request | The request object |
ResponseInterface | $response | The response, modified by this handler |
UnsupportedRequestTypeException | if the controller doesn't support the current request type |
Definition at line 126 of file CommandController.php.
References CommandController\$request, CommandController\$response, CommandController\canProcessRequest(), CommandController\initializeCommandMethodArguments(), and CommandController\resolveCommandMethodName().
|
protected |
Exits the CLI through the dispatcher An exit status code can be specified
int | $exitCode | Exit code to return on exit |
StopActionException |
Definition at line 344 of file CommandController.php.
Referenced by ExtensionCommandController\dumpClassLoadingInformationCommand().
|
protected |
Resolves and checks the current command method name
Note: The resulting command method name might not have the correct case, which isn't a problem because PHP is case insensitive regarding method names.
\TYPO3\CMS\Extbase\Mvc\Exception\NoSuchCommandException |
NoSuchCommandException |
Definition at line 152 of file CommandController.php.
References CommandController\$commandMethodName.
Referenced by CommandController\processRequest().
|
protected |
Restores the original user role
NULL | int | $originalRole |
Definition at line 287 of file CommandController.php.
|
protected |
Sends the response and exits the CLI without any further code execution Should be used for commands that flush code caches.
int | $exitCode | Exit code to return on exit |
Definition at line 357 of file CommandController.php.
|
protected |
Definition at line 49 of file CommandController.php.
Referenced by CommandController\forward(), CommandController\output(), CommandController\outputFormatted(), and CommandController\outputLine().
|
protected |
Definition at line 56 of file CommandController.php.
Referenced by CommandController\resolveCommandMethodName().
|
protected |
Definition at line 79 of file CommandController.php.
Referenced by CommandController\injectObjectManager().
|
protected |
Definition at line 84 of file CommandController.php.
|
protected |
Definition at line 74 of file CommandController.php.
Referenced by CommandController\injectReflectionService().
|
protected |
Definition at line 39 of file CommandController.php.
Referenced by CommandController\processRequest().
|
protected |
Definition at line 64 of file CommandController.php.
|
protected |
Definition at line 44 of file CommandController.php.
Referenced by CommandController\processRequest().
|
protected |
Definition at line 69 of file CommandController.php.