1 | <?php declare(strict_types=1); |
||
25 | class Rss extends XmlAbstract |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * Format version |
||
30 | */ |
||
31 | const VERSION = '2.0'; |
||
32 | |||
33 | /** |
||
34 | * RSS document must have a <rss> root node |
||
35 | */ |
||
36 | const ROOT_NODE_TAGNAME = 'rss'; |
||
37 | |||
38 | /** |
||
39 | * <channel> node contains feed's metadata |
||
40 | */ |
||
41 | const CHANNEL_NODE_TAGNAME = 'channel'; |
||
42 | |||
43 | /** |
||
44 | * publication date |
||
45 | */ |
||
46 | const DATE_NODE_TAGNAME = 'pubDate'; |
||
47 | |||
48 | protected $mandatoryFields = ['channel']; |
||
49 | |||
50 | /** |
||
51 | * Formats the document according to the standard's specification |
||
52 | * @param \DOMDocument $document |
||
53 | * @return \DOMDocument |
||
54 | */ |
||
55 | public function format(\DOMDocument $document) : \DOMDocument |
||
66 | |||
67 | /** |
||
68 | * Tells if the parser can handle the feed or not |
||
69 | * @param Document $document |
||
70 | * @return boolean |
||
71 | */ |
||
72 | 7 | public function canHandle(Document $document) : bool |
|
76 | |||
77 | /** |
||
78 | * @param DOMDocument $document |
||
79 | * @return \DomElement |
||
80 | */ |
||
81 | 6 | public function getMainElement(\DOMDocument $document) : \DOMElement |
|
85 | |||
86 | /** |
||
87 | * @return \FeedIo\RuleSet |
||
88 | */ |
||
89 | 6 | public function buildFeedRuleSet() : RuleSet |
|
96 | |||
97 | /** |
||
98 | * @return \FeedIo\RuleSet |
||
99 | */ |
||
100 | 9 | public function buildItemRuleSet() : RuleSet |
|
111 | |||
112 | /** |
||
113 | * @return \FeedIo\RuleSet |
||
114 | */ |
||
115 | 10 | protected function buildBaseRuleSet() : RuleSet |
|
127 | } |
||
128 |