You are here

public function InputDefinition::asXml 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::asXml()

Returns an XML representation of the InputDefinition.

Parameters

bool $asDom Whether to return a DOM or an XML string:

Return value

string|\DOMDocument An XML string representing the InputDefinition

Deprecated

since version 2.3, to be removed in 3.0.

File

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

Class

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

Namespace

Symfony\Component\Console\Input

Code

public function asXml($asDom = false) {
  @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
  $descriptor = new XmlDescriptor();
  if ($asDom) {
    return $descriptor
      ->getInputDefinitionDocument($this);
  }
  $output = new BufferedOutput();
  $descriptor
    ->describe($output, $this);
  return $output
    ->fetch();
}