TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Mvc\Cli\Command Class Reference
Inheritance diagram for TYPO3\CMS\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

 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 __construct ($controllerClassName, $controllerCommandName)
 
 getControllerClassName ()
 
 getControllerCommandName ()
 
 getCommandIdentifier ()
 
 getExtensionName ()
 
 getShortDescription ()
 
 getDescription ()
 
 hasArguments ()
 
 getArgumentDefinitions ()
 
 isInternal ()
 
 isCliOnly ()
 
 isFlushingCaches ()
 
 getRelatedCommandIdentifiers ()
 

Protected Member Functions

 getCommandMethodReflection ()
 

Protected Attributes

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

Detailed Description

Represents a Command

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

Definition at line 22 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 84 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 199 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 135 of file Command.php.

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

Referenced by TYPO3\CMS\Extbase\Mvc\Cli\CommandManager\commandMatchesIdentifier(), and TYPO3\CMS\Extbase\Mvc\Cli\CommandManager\getShortestIdentifierForCommand().

◆ getCommandMethodReflection()

◆ getControllerClassName()

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

Definition at line 117 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 125 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 168 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 145 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 259 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 155 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
bool

Definition at line 187 of file Command.php.

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

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

◆ injectObjectManager()

TYPO3\CMS\Extbase\Mvc\Cli\Command::injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManagerInterface  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface$objectManager

Definition at line 64 of file Command.php.

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

◆ injectReflectionService()

TYPO3\CMS\Extbase\Mvc\Cli\Command::injectReflectionService ( \TYPO3\CMS\Extbase\Reflection\ReflectionService  $reflectionService)
Parameters
\TYPO3\CMS\Extbase\Reflection\ReflectionService$reflectionService

Definition at line 72 of file Command.php.

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

◆ isCliOnly()

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

Tells if this command is meant to be used on CLI only.

Returns
bool

Definition at line 236 of file Command.php.

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

◆ 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
bool

Definition at line 248 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
bool

Definition at line 226 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.

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

◆ $reflectionService

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