TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Command Class Reference

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 typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

Constructor & Destructor Documentation

__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
\InvalidArgumentException

Definition at line 84 of file typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\$controllerClassName, and Command\$controllerCommandName.

Member Function Documentation

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 typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\$commandMethodReflection, Command\getCommandMethodReflection(), and Command\hasArguments().

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 typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\$commandIdentifier.

Referenced by CommandManager\commandMatchesIdentifier(), and CommandManager\getShortestIdentifierForCommand().

getCommandMethodReflection ( )
protected
getControllerClassName ( )
Returns
string

Definition at line 117 of file typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\$controllerClassName.

getControllerCommandName ( )
Returns
string

Definition at line 125 of file typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\$controllerCommandName.

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 typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\getCommandMethodReflection().

Referenced by Command\getShortDescription().

getExtensionName ( )

Returns the name of the extension to which this command belongs

Returns
string

Definition at line 145 of file typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\$extensionName.

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 typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\$commandMethodReflection, and Command\getCommandMethodReflection().

getShortDescription ( )

Returns a short description of this command

Returns
string A short description

Definition at line 155 of file typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\getCommandMethodReflection(), and Command\getDescription().

hasArguments ( )

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

Returns
bool

Definition at line 187 of file typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\getCommandMethodReflection().

Referenced by Command\getArgumentDefinitions().

injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManagerInterface  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface$objectManager

Definition at line 64 of file typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\$objectManager.

injectReflectionService ( \TYPO3\CMS\Extbase\Reflection\ReflectionService  $reflectionService)
Parameters
\TYPO3\CMS\Extbase\Reflection\ReflectionService$reflectionService

Definition at line 72 of file typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\$reflectionService.

isCliOnly ( )

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

Returns
bool

Definition at line 236 of file typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\getCommandMethodReflection().

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 typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\getCommandMethodReflection().

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 typo3/sysext/extbase/Classes/Mvc/Cli/Command.php.

References Command\getCommandMethodReflection().

Member Data Documentation

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