Symfony\Component\Console\Command\Command::getUsages PHP Method

getUsages() public method

Returns alternative usages of the command.
public getUsages ( ) : array
return array
    public function getUsages()
    {
        return $this->usages;
    }

Usage Example

Beispiel #1
0
 protected function describeCommand(Command $command, array $options = array())
 {
     $command->getSynopsis(true);
     $command->getSynopsis(false);
     $command->mergeApplicationDefinition(false);
     $this->writeText('<comment>Usage:</comment>', $options);
     foreach (array_merge(array($command->getSynopsis(true)), $command->getAliases(), $command->getUsages()) as $usage) {
         $this->writeText("\n");
         $this->writeText('  ' . $usage, $options);
     }
     $this->writeText("\n");
     $definition = $command->getNativeDefinition();
     if ($definition->getOptions() || $definition->getArguments()) {
         $this->writeText("\n");
         $this->describeInputDefinition($definition, $options);
         $this->writeText("\n");
     }
     if ($help = $command->getProcessedHelp()) {
         $this->writeText("\n");
         $this->writeText('<comment>Help:</comment>', $options);
         $this->writeText("\n");
         $this->writeText(' ' . str_replace("\n", "\n ", $help), $options);
         $this->writeText("\n");
     }
 }
All Usage Examples Of Symfony\Component\Console\Command\Command::getUsages