Neos\Flow\Command\HelpCommandController::helpCommand PHP Метод

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

The help command displays help for a given command: ./flow help
public helpCommand ( string $commandIdentifier = null ) : void
$commandIdentifier string Identifier of a command for more details
Результат void
    public function helpCommand($commandIdentifier = null)
    {
        $exceedingArguments = $this->request->getExceedingArguments();
        if (count($exceedingArguments) > 0 && $commandIdentifier === null) {
            $commandIdentifier = $exceedingArguments[0];
        }
        if ($commandIdentifier === null) {
            $this->displayHelpIndex();
        } else {
            $matchingCommands = $this->commandManager->getCommandsByIdentifier($commandIdentifier);
            $numberOfMatchingCommands = count($matchingCommands);
            if ($numberOfMatchingCommands === 0) {
                $this->outputLine('No command could be found that matches the command identifier "%s".', [$commandIdentifier]);
            } elseif ($numberOfMatchingCommands > 1) {
                $this->outputLine('%d commands match the command identifier "%s":', [$numberOfMatchingCommands, $commandIdentifier]);
                $this->displayShortHelpForCommands($matchingCommands);
            } else {
                $this->displayHelpForCommand(array_shift($matchingCommands));
            }
        }
    }