1 | <?php |
||
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 | 36 | public function __construct() |
|
40 | |||
41 | /** |
||
42 | * @return string $url |
||
43 | */ |
||
44 | 2 | public function getUrl() |
|
48 | |||
49 | /** |
||
50 | * @param string $url |
||
51 | * @return FeedInterface |
||
52 | */ |
||
53 | 2 | public function setUrl($url) |
|
59 | |||
60 | /** |
||
61 | * @return string $language |
||
62 | */ |
||
63 | 2 | public function getLanguage() |
|
67 | |||
68 | /** |
||
69 | * @param string $language |
||
70 | * @return FeedInterface |
||
71 | */ |
||
72 | 2 | public function setLanguage($language) |
|
78 | |||
79 | |||
80 | |||
81 | |||
82 | /** |
||
83 | * (PHP 5 >= 5.0.0)<br/> |
||
84 | * Return the current element |
||
85 | * @link http://php.net/manual/en/iterator.current.php |
||
86 | * @return mixed Can return any type. |
||
87 | */ |
||
88 | 16 | public function current() |
|
92 | |||
93 | /** |
||
94 | * (PHP 5 >= 5.0.0)<br/> |
||
95 | * Move forward to next element |
||
96 | * @link http://php.net/manual/en/iterator.next.php |
||
97 | * @return void Any returned value is ignored. |
||
98 | */ |
||
99 | 14 | public function next() |
|
103 | |||
104 | /** |
||
105 | * (PHP 5 >= 5.0.0)<br/> |
||
106 | * Return the key of the current element |
||
107 | * @link http://php.net/manual/en/iterator.key.php |
||
108 | * @return mixed scalar on success, or null on failure. |
||
109 | */ |
||
110 | 2 | public function key() |
|
114 | |||
115 | /** |
||
116 | * (PHP 5 >= 5.0.0)<br/> |
||
117 | * Checks if current position is valid |
||
118 | * @link http://php.net/manual/en/iterator.valid.php |
||
119 | * @return boolean The return value will be casted to boolean and then evaluated. |
||
120 | * Returns true on success or false on failure. |
||
121 | */ |
||
122 | 18 | public function valid() |
|
126 | |||
127 | /** |
||
128 | * (PHP 5 >= 5.0.0)<br/> |
||
129 | * Rewind the Iterator to the first element |
||
130 | * @link http://php.net/manual/en/iterator.rewind.php |
||
131 | * @return void Any returned value is ignored. |
||
132 | */ |
||
133 | 16 | public function rewind() |
|
137 | |||
138 | /** |
||
139 | * @param ItemInterface $item |
||
140 | * @return $this |
||
141 | */ |
||
142 | 23 | public function add(ItemInterface $item) |
|
148 | |||
149 | /** |
||
150 | * @return ItemInterface |
||
151 | */ |
||
152 | 8 | public function newItem() |
|
156 | |||
157 | /** |
||
158 | * @return array |
||
159 | */ |
||
160 | 1 | public function jsonSerialize() |
|
164 | |||
165 | /** |
||
166 | * @return array |
||
167 | */ |
||
168 | 2 | public function toArray() |
|
181 | |||
182 | /** |
||
183 | * @return int |
||
184 | */ |
||
185 | 1 | public function count() |
|
189 | } |
||
190 |