$this->
writeDocument($this->
getInputDefinitionDocument($definition));
} protected function describeCommand(Command
$command, array
$options =
[]): void
{ $this->
writeDocument($this->
getCommandDocument($command,
$options['short'
] ?? false
));
} protected function describeApplication(Application
$application, array
$options =
[]): void
{ $this->
writeDocument($this->
getApplicationDocument($application,
$options['namespace'
] ?? null,
$options['short'
] ?? false
));
} /**
* Appends document children to parent node.
*/
private function appendDocument(\DOMNode
$parentNode, \DOMNode
$importedParent): void
{ foreach ($importedParent->childNodes
as $childNode) { $parentNode->
appendChild($parentNode->ownerDocument->
importNode($childNode, true
));
} }