public function Command::asXml in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Command/Command.php \Symfony\Component\Console\Command\Command::asXml()
Returns an XML representation of the command.
Parameters
bool $asDom Whether to return a DOM or an XML string:
Return value
string|\DOMDocument An XML string representing the command
Deprecated
since version 2.3, to be removed in 3.0.
File
- vendor/
symfony/ console/ Command/ Command.php, line 635
Class
- Command
- Base class for all commands.
Namespace
Symfony\Component\Console\CommandCode
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
->getCommandDocument($this);
}
$output = new BufferedOutput();
$descriptor
->describe($output, $this);
return $output
->fetch();
}