protected function writeNodeDependencies(\DOMElement $xml, AbstractASTArtifact $node)
{
if (!$this->dependencyAnalyzer) {
return;
}
$xml = end($this->xmlStack);
$doc = $xml->ownerDocument;
$efferentXml = $doc->createElement('efferent');
$xml->appendChild($efferentXml);
foreach ($this->dependencyAnalyzer->getEfferents($node) as $type) {
$typeXml = $doc->createElement('type');
$typeXml->setAttribute('namespace', Utf8Util::ensureEncoding($type->getNamespaceName()));
$typeXml->setAttribute('name', Utf8Util::ensureEncoding($type->getName()));
$efferentXml->appendChild($typeXml);
}
$afferentXml = $doc->createElement('afferent');
$xml->appendChild($afferentXml);
foreach ($this->dependencyAnalyzer->getAfferents($node) as $type) {
$typeXml = $doc->createElement('type');
$typeXml->setAttribute('namespace', Utf8Util::ensureEncoding($type->getNamespaceName()));
$typeXml->setAttribute('name', Utf8Util::ensureEncoding($type->getName()));
$afferentXml->appendChild($typeXml);
}
}