TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Mvc\Cli\Command Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\Cli\Command:
Tx_Extbase_MVC_CLI_Command TYPO3\CMS\Extbase\Tests\Unit\Mvc\Cli\Fixture\Command\MockACommandController TYPO3\CMS\Extbase\Tests\Unit\Mvc\Cli\Fixture\Command\MockBCommandController

Public Member Functions

 __construct ($controllerClassName, $controllerCommandName)
 
 getControllerClassName ()
 
 getControllerCommandName ()
 
 getCommandIdentifier ()
 
 getExtensionName ()
 
 getShortDescription ()
 
 getDescription ()
 
 hasArguments ()
 
 getArgumentDefinitions ()
 
 isInternal ()
 
 isFlushingCaches ()
 
 getRelatedCommandIdentifiers ()
 

Protected Member Functions

 getCommandMethodReflection ()
 

Protected Attributes

 $objectManager
 
 $controllerClassName
 
 $controllerCommandName
 
 $commandIdentifier
 
 $commandMethodReflection
 
 $extensionName
 
 $reflectionService
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Represents a Command

http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later

Definition at line 21 of file Command.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Mvc\Cli\Command::__construct (   $controllerClassName,
  $controllerCommandName 
)

Constructor

Parameters
string$controllerClassNameClass name of the controller providing the command
string$controllerCommandNameCommand name, i.e. the method name of the command, without the "Command" suffix
Exceptions

Definition at line 71 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\$controllerClassName, TYPO3\CMS\Extbase\Mvc\Cli\Command\$controllerCommandName, and TYPO3\CMS\Core\Utility\GeneralUtility\camelCaseToLowerCaseUnderscored().

Member Function Documentation

◆ getArgumentDefinitions()

TYPO3\CMS\Extbase\Mvc\Cli\Command::getArgumentDefinitions ( )

Returns an array of that contains information about required/optional arguments of this command. If the command does not expect any arguments, an empty array is returned

Returns
array<>

Definition at line 170 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\$commandMethodReflection, TYPO3\CMS\Extbase\Mvc\Cli\Command\getCommandMethodReflection(), and TYPO3\CMS\Extbase\Mvc\Cli\Command\hasArguments().

◆ getCommandIdentifier()

TYPO3\CMS\Extbase\Mvc\Cli\Command::getCommandIdentifier ( )

Returns the command identifier for this command

Returns
string The command identifier for this command, following the pattern extensionname:controllername:commandname

Definition at line 111 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\$commandIdentifier.

◆ getCommandMethodReflection()

◆ getControllerClassName()

TYPO3\CMS\Extbase\Mvc\Cli\Command::getControllerClassName ( )
Returns
string

Definition at line 95 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\$controllerClassName.

◆ getControllerCommandName()

TYPO3\CMS\Extbase\Mvc\Cli\Command::getControllerCommandName ( )
Returns
string

Definition at line 102 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\$controllerCommandName.

◆ getDescription()

TYPO3\CMS\Extbase\Mvc\Cli\Command::getDescription ( )

Returns a longer description of this command This is the complete method description except for the first line which can be retrieved via getShortDescription() If The command description only consists of one line, an empty string is returned

Returns
string A longer description of this command

Definition at line 141 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\getCommandMethodReflection().

Referenced by TYPO3\CMS\Extbase\Mvc\Cli\Command\getShortDescription().

◆ getExtensionName()

TYPO3\CMS\Extbase\Mvc\Cli\Command::getExtensionName ( )

Returns the name of the extension to which this command belongs

Returns
string

Definition at line 120 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\$extensionName.

◆ getRelatedCommandIdentifiers()

TYPO3\CMS\Extbase\Mvc\Cli\Command::getRelatedCommandIdentifiers ( )

Returns an array of command identifiers which were specified in the "@see" annotation of a command method.

Returns
array

Definition at line 217 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\$commandMethodReflection, and TYPO3\CMS\Extbase\Mvc\Cli\Command\getCommandMethodReflection().

◆ getShortDescription()

TYPO3\CMS\Extbase\Mvc\Cli\Command::getShortDescription ( )

Returns a short description of this command

Returns
string A short description

Definition at line 129 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\getCommandMethodReflection(), and TYPO3\CMS\Extbase\Mvc\Cli\Command\getDescription().

◆ hasArguments()

TYPO3\CMS\Extbase\Mvc\Cli\Command::hasArguments ( )

Returns TRUE if this command expects required and/or optional arguments, otherwise FALSE

Returns
boolean

Definition at line 159 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\getCommandMethodReflection().

Referenced by TYPO3\CMS\Extbase\Mvc\Cli\Command\getArgumentDefinitions().

◆ isFlushingCaches()

TYPO3\CMS\Extbase\Mvc\Cli\Command::isFlushingCaches ( )

Tells if this command flushes all caches and thus needs special attention in the interactive shell.

Note that neither this method nor the annotation is currently part of the official API.

Returns
boolean

Definition at line 207 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\getCommandMethodReflection().

◆ isInternal()

TYPO3\CMS\Extbase\Mvc\Cli\Command::isInternal ( )

Tells if this command is internal and thus should not be exposed through help texts, user documentation etc. Internall commands are still accessible through the regular command line interface, but should not be used by users.

Returns
boolean

Definition at line 196 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\getCommandMethodReflection().

Member Data Documentation

◆ $commandIdentifier

TYPO3\CMS\Extbase\Mvc\Cli\Command::$commandIdentifier
protected

Definition at line 42 of file Command.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Cli\Command\getCommandIdentifier().

◆ $commandMethodReflection

◆ $controllerClassName

TYPO3\CMS\Extbase\Mvc\Cli\Command::$controllerClassName
protected

◆ $controllerCommandName

TYPO3\CMS\Extbase\Mvc\Cli\Command::$controllerCommandName
protected

◆ $extensionName

TYPO3\CMS\Extbase\Mvc\Cli\Command::$extensionName
protected

Definition at line 54 of file Command.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Cli\Command\getExtensionName().

◆ $objectManager

TYPO3\CMS\Extbase\Mvc\Cli\Command::$objectManager
protected

Definition at line 27 of file Command.php.

◆ $reflectionService

TYPO3\CMS\Extbase\Mvc\Cli\Command::$reflectionService
protected

Definition at line 62 of file Command.php.