1 | <?php declare(strict_types=1); |
||
17 | class Feed extends Node implements FeedInterface, \JsonSerializable |
||
18 | { |
||
19 | /** |
||
20 | * @var \ArrayIterator |
||
21 | */ |
||
22 | protected $items; |
||
23 | |||
24 | /** |
||
25 | * @var string $url |
||
26 | */ |
||
27 | protected $url; |
||
28 | |||
29 | /** |
||
30 | * @var string $language |
||
31 | */ |
||
32 | protected $language; |
||
33 | |||
34 | protected $ns; |
||
35 | |||
36 | 41 | public function __construct() |
|
43 | |||
44 | /** |
||
45 | * @return string $url |
||
46 | */ |
||
47 | 3 | public function getUrl() : ? string |
|
51 | |||
52 | /** |
||
53 | * @param string $url |
||
54 | * @return FeedInterface |
||
55 | */ |
||
56 | 5 | public function setUrl(string $url = null) : FeedInterface |
|
62 | |||
63 | /** |
||
64 | * @return string $language |
||
65 | */ |
||
66 | 4 | public function getLanguage(): ? string |
|
70 | |||
71 | /** |
||
72 | * @param string $language |
||
73 | * @return FeedInterface |
||
74 | */ |
||
75 | 2 | public function setLanguage(string $language = null): FeedInterface |
|
81 | |||
82 | |||
83 | |||
84 | |||
85 | /** |
||
86 | * (PHP 5 >= 5.0.0)<br/> |
||
87 | * Return the current element |
||
88 | * @link http://php.net/manual/en/iterator.current.php |
||
89 | * @return mixed Can return any type. |
||
90 | */ |
||
91 | 19 | public function current() |
|
95 | |||
96 | /** |
||
97 | * (PHP 5 >= 5.0.0)<br/> |
||
98 | * Move forward to next element |
||
99 | * @link http://php.net/manual/en/iterator.next.php |
||
100 | * @return void Any returned value is ignored. |
||
101 | */ |
||
102 | 17 | public function next() |
|
106 | |||
107 | /** |
||
108 | * (PHP 5 >= 5.0.0)<br/> |
||
109 | * Return the key of the current element |
||
110 | * @link http://php.net/manual/en/iterator.key.php |
||
111 | * @return mixed scalar on success, or null on failure. |
||
112 | */ |
||
113 | 2 | public function key() |
|
117 | |||
118 | /** |
||
119 | * (PHP 5 >= 5.0.0)<br/> |
||
120 | * Checks if current position is valid |
||
121 | * @link http://php.net/manual/en/iterator.valid.php |
||
122 | * @return boolean The return value will be casted to boolean and then evaluated. |
||
123 | * Returns true on success or false on failure. |
||
124 | */ |
||
125 | 21 | public function valid() |
|
129 | |||
130 | /** |
||
131 | * (PHP 5 >= 5.0.0)<br/> |
||
132 | * Rewind the Iterator to the first element |
||
133 | * @link http://php.net/manual/en/iterator.rewind.php |
||
134 | * @return void Any returned value is ignored. |
||
135 | */ |
||
136 | 19 | public function rewind() |
|
140 | |||
141 | /** |
||
142 | * @param ItemInterface $item |
||
143 | * @return $this |
||
144 | */ |
||
145 | 28 | public function add(ItemInterface $item) : FeedInterface |
|
151 | |||
152 | 2 | public function addNS(string $ns, string $dtd) : FeedInterface |
|
158 | |||
159 | 6 | public function getNS() : \ArrayIterator |
|
163 | |||
164 | /** |
||
165 | * @return ItemInterface |
||
166 | */ |
||
167 | 10 | public function newItem() : ItemInterface |
|
171 | |||
172 | /** |
||
173 | * @return array |
||
174 | */ |
||
175 | 1 | public function jsonSerialize() : array |
|
179 | |||
180 | /** |
||
181 | * @return array |
||
182 | */ |
||
183 | 2 | public function toArray() : array |
|
196 | |||
197 | /** |
||
198 | * @return int |
||
199 | */ |
||
200 | 1 | public function count() : int |
|
204 | } |
||
205 |