@@ 38-46 (lines=9) @@ | ||
35 | * @param CategoryInterface $category |
|
36 | * @return \DomElement |
|
37 | */ |
|
38 | public function createCategoryElement(\DomDocument $document, CategoryInterface $category) : \DOMElement |
|
39 | { |
|
40 | $element = $document->createElement($this->getNodeName()); |
|
41 | $element->setAttribute('scheme', $category->getScheme() ?? ''); |
|
42 | $element->setAttribute('term', $category->getTerm() ?? ''); |
|
43 | $element->setAttribute('label', $category->getLabel() ?? ''); |
|
44 | ||
45 | return $element; |
|
46 | } |
|
47 | } |
|
48 |
@@ 62-70 (lines=9) @@ | ||
59 | * @param MediaInterface $media |
|
60 | * @return \DomElement |
|
61 | */ |
|
62 | public function createMediaElement(\DomDocument $document, MediaInterface $media) : \DOMElement |
|
63 | { |
|
64 | $element = $document->createElement($this->getNodeName()); |
|
65 | $element->setAttribute($this->getUrlAttributeName(), $media->getUrl()); |
|
66 | $element->setAttribute('type', $media->getType() ?? ''); |
|
67 | $element->setAttribute('length', $media->getLength() ?? ''); |
|
68 | ||
69 | return $element; |
|
70 | } |
|
71 | ||
72 | /** |
|
73 | * @inheritDoc |