You are here

protected function MarkdownDescriptor::describeInputDefinition in Zircon Profile 8

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

Describes an InputDefinition instance.

Parameters

InputDefinition $definition:

array $options:

Return value

string|mixed

Overrides Descriptor::describeInputDefinition

1 call to MarkdownDescriptor::describeInputDefinition()
MarkdownDescriptor::describeCommand in vendor/symfony/console/Descriptor/MarkdownDescriptor.php
Describes a Command instance.

File

vendor/symfony/console/Descriptor/MarkdownDescriptor.php, line 64

Class

MarkdownDescriptor
Markdown descriptor.

Namespace

Symfony\Component\Console\Descriptor

Code

protected function describeInputDefinition(InputDefinition $definition, array $options = array()) {
  if ($showArguments = count($definition
    ->getArguments()) > 0) {
    $this
      ->write('### Arguments:');
    foreach ($definition
      ->getArguments() as $argument) {
      $this
        ->write("\n\n");
      $this
        ->write($this
        ->describeInputArgument($argument));
    }
  }
  if (count($definition
    ->getOptions()) > 0) {
    if ($showArguments) {
      $this
        ->write("\n\n");
    }
    $this
      ->write('### Options:');
    foreach ($definition
      ->getOptions() as $option) {
      $this
        ->write("\n\n");
      $this
        ->write($this
        ->describeInputOption($option));
    }
  }
}