src/FeedIo/Rule/Atom/Category.php 1 location
|
@@ 41-49 (lines=9) @@
|
38 |
|
* @param CategoryInterface $category |
39 |
|
* @return \DomElement |
40 |
|
*/ |
41 |
|
public function createCategoryElement(\DomDocument $document, CategoryInterface $category) |
42 |
|
{ |
43 |
|
$element = $document->createElement($this->getNodeName()); |
44 |
|
$element->setAttribute('scheme', $category->getScheme()); |
45 |
|
$element->setAttribute('term', $category->getTerm()); |
46 |
|
$element->setAttribute('label', $category->getLabel()); |
47 |
|
|
48 |
|
return $element; |
49 |
|
} |
50 |
|
} |
51 |
|
|
src/FeedIo/Rule/Category.php 1 location
|
@@ 61-70 (lines=10) @@
|
58 |
|
* @param CategoryInterface $category |
59 |
|
* @return \DomElement |
60 |
|
*/ |
61 |
|
public function createCategoryElement(\DomDocument $document, CategoryInterface $category) |
62 |
|
{ |
63 |
|
$element = $document->createElement( |
64 |
|
$this->getNodeName(), |
65 |
|
is_null($category->getTerm()) ? $category->getLabel():$category->getTerm() |
66 |
|
); |
67 |
|
$element->setAttribute('domain', $category->getScheme()); |
68 |
|
|
69 |
|
return $element; |
70 |
|
} |
71 |
|
} |
72 |
|
|