‪TYPO3CMS  9.5
TYPO3\CMS\Extbase\Mvc\Cli\Command Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\Cli\Command:
TYPO3\CMS\Extbase\Tests\UnitDeprecated\Mvc\Cli\Fixture\Command\MockACommandController TYPO3\CMS\Extbase\Tests\UnitDeprecated\Mvc\Cli\Fixture\Command\MockBCommandController TYPO3\CMS\Extbase\Tests\UnitDeprecated\Mvc\Cli\Fixture\Command\MockCCommandController

Public Member Functions

 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 __construct ($controllerClassName, $controllerCommandName)
 
 initializeObject ()
 
string getControllerClassName ()
 
string getControllerCommandName ()
 
string getCommandIdentifier ()
 
string getExtensionName ()
 
string getShortDescription ()
 
string getDescription ()
 
bool hasArguments ()
 
array<\TYPO3\CMS\Extbase\Mvc\Cli\CommandArgumentDefinitiongetArgumentDefinitions ()
 
bool isInternal ()
 
bool isCliOnly ()
 
bool isFlushingCaches ()
 
array getRelatedCommandIdentifiers ()
 

Protected Attributes

TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 
string $controllerClassName
 
string $controllerCommandName
 
string $commandIdentifier
 
string $extensionName
 
TYPO3 CMS Extbase Reflection ReflectionService $reflectionService
 
ClassSchema $classSchema
 
string $controllerCommandMethod
 

Detailed Description

Represents a Command

Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0. Use symfony/console commands instead.

Definition at line 24 of file Command.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor

Parameters
string$controllerClassName‪Class 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 83 of file Command.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Command\$controllerClassName, and TYPO3\CMS\Extbase\Mvc\Cli\Command\$controllerCommandName.

Member Function Documentation

◆ getArgumentDefinitions()

array<\TYPO3\CMS\Extbase\Mvc\Cli\CommandArgumentDefinition> TYPO3\CMS\Extbase\Mvc\Cli\Command::getArgumentDefinitions ( )

Returns an array of \TYPO3\CMS\Extbase\Mvc\Cli\CommandArgumentDefinition 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<\TYPO3\CMS\Extbase\Mvc\Cli\CommandArgumentDefinition>

Definition at line 203 of file Command.php.

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

◆ getCommandIdentifier()

string 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 139 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().

◆ getControllerClassName()

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

Definition at line 121 of file Command.php.

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

◆ getControllerCommandName()

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

Definition at line 129 of file Command.php.

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

◆ getDescription()

string 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 172 of file Command.php.

◆ getExtensionName()

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

Returns the name of the extension to which this command belongs

Returns
‪string

Definition at line 149 of file Command.php.

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

◆ getRelatedCommandIdentifiers()

array 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 268 of file Command.php.

◆ getShortDescription()

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

Returns a short description of this command

Returns
‪string A short description

Definition at line 159 of file Command.php.

◆ hasArguments()

bool 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 191 of file Command.php.

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

◆ initializeObject()

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

Definition at line 113 of file Command.php.

◆ injectObjectManager()

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

Definition at line 63 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 71 of file Command.php.

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

◆ isCliOnly()

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

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

Returns
‪bool

Definition at line 239 of file Command.php.

◆ isFlushingCaches()

bool 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 @flushesCaches annotation is currently part of the official API.

Returns
‪bool
Deprecated:
‪will be removed in TYPO3 v10.0.

Definition at line 253 of file Command.php.

◆ isInternal()

bool 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 229 of file Command.php.

Member Data Documentation

◆ $classSchema

ClassSchema TYPO3\CMS\Extbase\Mvc\Cli\Command::$classSchema
protected

Definition at line 54 of file Command.php.

◆ $commandIdentifier

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

Definition at line 40 of file Command.php.

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

◆ $controllerClassName

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

◆ $controllerCommandMethod

string TYPO3\CMS\Extbase\Mvc\Cli\Command::$controllerCommandMethod
protected

Definition at line 58 of file Command.php.

◆ $controllerCommandName

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

◆ $extensionName

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

Name of the extension to which this command belongs

Definition at line 46 of file Command.php.

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

◆ $objectManager

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

Definition at line 28 of file Command.php.

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

◆ $reflectionService

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