You are here

private function JsonDescriptor::getCommandData in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Descriptor/JsonDescriptor.php \Symfony\Component\Console\Descriptor\JsonDescriptor::getCommandData()

Parameters

Command $command:

Return value

array

2 calls to JsonDescriptor::getCommandData()
JsonDescriptor::describeApplication in vendor/symfony/console/Descriptor/JsonDescriptor.php
Describes an Application instance.
JsonDescriptor::describeCommand in vendor/symfony/console/Descriptor/JsonDescriptor.php
Describes a Command instance.

File

vendor/symfony/console/Descriptor/JsonDescriptor.php, line 153

Class

JsonDescriptor
JSON descriptor.

Namespace

Symfony\Component\Console\Descriptor

Code

private function getCommandData(Command $command) {
  $command
    ->getSynopsis();
  $command
    ->mergeApplicationDefinition(false);
  return array(
    'name' => $command
      ->getName(),
    'usage' => array_merge(array(
      $command
        ->getSynopsis(),
    ), $command
      ->getUsages(), $command
      ->getAliases()),
    'description' => $command
      ->getDescription(),
    'help' => $command
      ->getProcessedHelp(),
    'definition' => $this
      ->getInputDefinitionData($command
      ->getNativeDefinition()),
  );
}