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

getNativeDefinition() public method

Can be overridden to provide the original command representation when it would otherwise be changed by merging with the application InputDefinition. This method is not part of public API and should not be used directly.
public getNativeDefinition ( ) : Symfony\Component\Console\Input\InputDefinition
return Symfony\Component\Console\Input\InputDefinition An InputDefinition instance
    public function getNativeDefinition()
    {
        return $this->getDefinition();
    }

Usage Example

 /**
  * @inheritdoc
  */
 protected function describeCommand(Command $command, array $options = [])
 {
     $command->getSynopsis();
     $command->mergeApplicationDefinition(false);
     $this->write($command->getName() . "\n" . str_repeat('-', strlen($command->getName())) . "\n");
     if ($description = $command->getDescription()) {
         $this->write("{$description}\n\n");
     }
     $aliases = $command instanceof CommandBase ? $command->getVisibleAliases() : $command->getAliases();
     if ($aliases) {
         $this->write('Aliases: ' . '`' . implode('`, `', $aliases) . '`' . "\n\n");
     }
     $executableName = 'platform';
     $this->write("## Usage:\n\n```\n{$executableName} " . $command->getSynopsis() . "\n```\n\n");
     if ($help = $command->getProcessedHelp()) {
         $this->write($help);
         $this->write("\n\n");
     }
     if ($command->getNativeDefinition()) {
         $this->describeInputDefinition($command->getNativeDefinition());
         $this->write("\n\n");
     }
     if ($command instanceof CommandBase && ($examples = $command->getExamples())) {
         $this->write('## Examples');
         $this->write("\n");
         $name = $command->getName();
         foreach ($examples as $arguments => $description) {
             $this->write("\n* {$description}:  \n  ```\n  platform {$name} {$arguments}\n  ```\n");
         }
         $this->write("\n");
     }
 }
All Usage Examples Of Symfony\Component\Console\Command\Command::getNativeDefinition