| @@ 40-50 (lines=11) @@ | ||
| 37 | /** | |
| 38 | * @inheritDoc | |
| 39 | */ | |
| 40 | protected function addElement(\DomDocument $document, \DOMElement $rootElement, NodeInterface $node) : void | |
| 41 |     { | |
| 42 |         if ($node instanceof ItemInterface) { | |
| 43 | $element = $document->createElement(static::NODE_NAME); | |
| 44 | $this->appendNonEmptyChild($document, $element, 'name', $node->getAuthor()->getName()); | |
| 45 | $this->appendNonEmptyChild($document, $element, 'uri', $node->getAuthor()->getUri()); | |
| 46 | $this->appendNonEmptyChild($document, $element, 'email', $node->getAuthor()->getEmail()); | |
| 47 | ||
| 48 | $rootElement->appendChild($element); | |
| 49 | } | |
| 50 | } | |
| 51 | } | |
| 52 | ||
| @@ 67-77 (lines=11) @@ | ||
| 64 | /** | |
| 65 | * @inheritDoc | |
| 66 | */ | |
| 67 | protected function addElement(\DomDocument $document, \DOMElement $rootElement, NodeInterface $node) : void | |
| 68 |     { | |
| 69 |         if ($node instanceof FeedInterface) { | |
| 70 | $element = $document->createElement(static::NODE_NAME); | |
| 71 | $this->appendNonEmptyChild($document, $element, 'url', $node->getLogo()); | |
| 72 | $this->appendNonEmptyChild($document, $element, 'title', $node->getTitle()); | |
| 73 | $this->appendNonEmptyChild($document, $element, 'link', $node->getLink()); | |
| 74 | ||
| 75 | $rootElement->appendChild($element); | |
| 76 | } | |
| 77 | } | |
| 78 | } | |
| 79 | ||