You are here

public function InputDefinition::getOptionDefaults in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Input/InputDefinition.php \Symfony\Component\Console\Input\InputDefinition::getOptionDefaults()

Gets an array of default values.

Return value

array An array of all default values

File

vendor/symfony/console/Input/InputDefinition.php, line 333

Class

InputDefinition
A InputDefinition represents a set of valid command line arguments and options.

Namespace

Symfony\Component\Console\Input

Code

public function getOptionDefaults() {
  $values = array();
  foreach ($this->options as $option) {
    $values[$option
      ->getName()] = $option
      ->getDefault();
  }
  return $values;
}