You are here

private function JsonDescriptor::getInputDefinitionData 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::getInputDefinitionData()

Parameters

InputDefinition $definition:

Return value

array

2 calls to JsonDescriptor::getInputDefinitionData()
JsonDescriptor::describeInputDefinition in vendor/symfony/console/Descriptor/JsonDescriptor.php
Describes an InputDefinition instance.
JsonDescriptor::getCommandData in vendor/symfony/console/Descriptor/JsonDescriptor.php

File

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

Class

JsonDescriptor
JSON descriptor.

Namespace

Symfony\Component\Console\Descriptor

Code

private function getInputDefinitionData(InputDefinition $definition) {
  $inputArguments = array();
  foreach ($definition
    ->getArguments() as $name => $argument) {
    $inputArguments[$name] = $this
      ->getInputArgumentData($argument);
  }
  $inputOptions = array();
  foreach ($definition
    ->getOptions() as $name => $option) {
    $inputOptions[$name] = $this
      ->getInputOptionData($option);
  }
  return array(
    'arguments' => $inputArguments,
    'options' => $inputOptions,
  );
}