PHP Class Neos\Flow\Cli\CommandManager

Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$availableCommands array
$bootstrap Neos\Flow\Core\Bootstrap
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$shortCommandIdentifiers array

Méthodes publiques

Méthode Description
getAvailableCommands ( ) : array Returns an array of all commands
getCommandByIdentifier ( string $commandIdentifier ) : Command Returns a Command that matches the given identifier.
getCommandControllerMethodArguments ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : array
getCommandMethodParameters ( string $controllerObjectName, string $commandMethodName ) : array Get the possible parameters for the command specified by CommandController and method name.
getCommandsByIdentifier ( string $commandIdentifier ) : array Returns an array of Commands that matches the given identifier.
getShortestIdentifierForCommand ( Command $command ) : string Returns the shortest, non-ambiguous command identifier for the given command
injectBootstrap ( Bootstrap $bootstrap ) : void
injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void

Méthodes protégées

Méthode Description
commandMatchesIdentifier ( Command $command, string $commandIdentifier ) : boolean Returns TRUE if the specified command identifier matches the identifier of the specified command.
getShortCommandIdentifiers ( ) : array Returns an array that contains all available command identifiers and their shortest non-ambiguous alias

Method Details

commandMatchesIdentifier() protected méthode

This is the case, if - the identifiers are the same - if at least the last two command parts match (case sensitive) or - if only the package key is specified and matches the commands package key The first part (package key) can be reduced to the last subpackage, as long as the result is unambiguous.
protected commandMatchesIdentifier ( Command $command, string $commandIdentifier ) : boolean
$command Command
$commandIdentifier string command identifier in the format foo:bar:baz (all lower case)
Résultat boolean TRUE if the specified command identifier matches this commands identifier

getAvailableCommands() public méthode

Returns an array of all commands
public getAvailableCommands ( ) : array
Résultat array

getCommandByIdentifier() public méthode

If no Command could be found a CommandNotFoundException is thrown If more than one Command matches an AmbiguousCommandIdentifierException is thrown that contains the matched Commands
public getCommandByIdentifier ( string $commandIdentifier ) : Command
$commandIdentifier string command identifier in the format foo:bar:baz
Résultat Command

getCommandControllerMethodArguments() public static méthode

public static getCommandControllerMethodArguments ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : array
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
Résultat array Array of method arguments per controller and method.

getCommandMethodParameters() public méthode

Get the possible parameters for the command specified by CommandController and method name.
public getCommandMethodParameters ( string $controllerObjectName, string $commandMethodName ) : array
$controllerObjectName string
$commandMethodName string
Résultat array

getCommandsByIdentifier() public méthode

If no Command could be found, an empty array is returned
public getCommandsByIdentifier ( string $commandIdentifier ) : array
$commandIdentifier string command identifier in the format foo:bar:baz
Résultat array

getShortCommandIdentifiers() protected méthode

Returns an array that contains all available command identifiers and their shortest non-ambiguous alias
protected getShortCommandIdentifiers ( ) : array
Résultat array in the format array('full.command:identifier1' => 'alias1', 'full.command:identifier2' => 'alias2')

getShortestIdentifierForCommand() public méthode

Returns the shortest, non-ambiguous command identifier for the given command
public getShortestIdentifierForCommand ( Command $command ) : string
$command Command The command
Résultat string The shortest possible command identifier

injectBootstrap() public méthode

public injectBootstrap ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
Résultat void

injectObjectManager() public méthode

public injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
Résultat void

Property Details

$availableCommands protected_oe property

protected array $availableCommands
Résultat array

$bootstrap protected_oe property

protected Bootstrap,Neos\Flow\Core $bootstrap
Résultat Neos\Flow\Core\Bootstrap

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Résultat Neos\Flow\ObjectManagement\ObjectManagerInterface

$shortCommandIdentifiers protected_oe property

protected array $shortCommandIdentifiers
Résultat array