PHP Класс Neos\Flow\Cli\CommandManager

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$availableCommands array
$bootstrap Neos\Flow\Core\Bootstrap
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$shortCommandIdentifiers array

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Описание методов

commandMatchesIdentifier() защищенный Метод

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)
Результат boolean TRUE if the specified command identifier matches this commands identifier

getAvailableCommands() публичный Метод

Returns an array of all commands
public getAvailableCommands ( ) : array
Результат array

getCommandByIdentifier() публичный Метод

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
Результат Command

getCommandControllerMethodArguments() публичный статический Метод

public static getCommandControllerMethodArguments ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : array
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
Результат array Array of method arguments per controller and method.

getCommandMethodParameters() публичный Метод

Get the possible parameters for the command specified by CommandController and method name.
public getCommandMethodParameters ( string $controllerObjectName, string $commandMethodName ) : array
$controllerObjectName string
$commandMethodName string
Результат array

getCommandsByIdentifier() публичный Метод

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
Результат array

getShortCommandIdentifiers() защищенный Метод

Returns an array that contains all available command identifiers and their shortest non-ambiguous alias
protected getShortCommandIdentifiers ( ) : array
Результат array in the format array('full.command:identifier1' => 'alias1', 'full.command:identifier2' => 'alias2')

getShortestIdentifierForCommand() публичный Метод

Returns the shortest, non-ambiguous command identifier for the given command
public getShortestIdentifierForCommand ( Command $command ) : string
$command Command The command
Результат string The shortest possible command identifier

injectBootstrap() публичный Метод

public injectBootstrap ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
Результат void

injectObjectManager() публичный Метод

public injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
Результат void

Описание свойств

$availableCommands защищенное свойство

protected array $availableCommands
Результат array

$bootstrap защищенное свойство

protected Bootstrap,Neos\Flow\Core $bootstrap
Результат Neos\Flow\Core\Bootstrap

$objectManager защищенное свойство

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Результат Neos\Flow\ObjectManagement\ObjectManagerInterface

$shortCommandIdentifiers защищенное свойство

protected array $shortCommandIdentifiers
Результат array