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