1 | <?php |
||
20 | class Atom extends StandardAbstract |
||
21 | { |
||
22 | /** |
||
23 | * Atom document must have a <feed> root node |
||
24 | */ |
||
25 | const ROOT_NODE_TAGNAME = 'feed'; |
||
26 | |||
27 | const ITEM_NODE = 'entry'; |
||
28 | |||
29 | /** |
||
30 | * Formats the document according to the standard's specification |
||
31 | * @param \DOMDocument $document |
||
32 | * @return \DOMDocument |
||
33 | */ |
||
34 | 2 | public function format(\DOMDocument $document) |
|
42 | |||
43 | /** |
||
44 | * Tells if the parser can handle the feed or not |
||
45 | * @param \DOMDocument $document |
||
46 | * @return mixed |
||
47 | */ |
||
48 | 3 | public function canHandle(\DOMDocument $document) |
|
52 | |||
53 | /** |
||
54 | * @param DOMDocument $document |
||
55 | * @return \DomElement |
||
56 | */ |
||
57 | 4 | public function getMainElement(\DOMDocument $document) |
|
61 | |||
62 | /** |
||
63 | * Builds and returns a rule set to parse the root node |
||
64 | * @return \FeedIo\RuleSet |
||
65 | */ |
||
66 | 5 | public function buildFeedRuleSet() |
|
77 | |||
78 | /** |
||
79 | * Builds and returns a rule set to parse an item |
||
80 | * @return \FeedIo\RuleSet |
||
81 | */ |
||
82 | 4 | public function buildItemRuleSet() |
|
89 | |||
90 | /** |
||
91 | * @return RuleSet |
||
92 | */ |
||
93 | 5 | protected function buildBaseRuleSet() |
|
100 | } |
||
101 |