1 | <?php |
||
17 | class Node extends AbstractModel |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * Constants for usage in setChangefreq() |
||
22 | */ |
||
23 | const CHANGE_FREQ_AWLAYS = 'always'; |
||
24 | const CHANGE_FREQ_HOURLY = 'hourly'; |
||
25 | const CHANGE_FREQ_DAILY = 'daily'; |
||
26 | const CHANGE_FREQ_WEEKLY = 'weekly'; |
||
27 | const CHNAGE_FREQ_MONTHLY = 'monthly'; |
||
28 | const CHANGE_FREQ_YEARLY = 'yearly'; |
||
29 | const CHANGE_FREQ_NEVER = 'never'; |
||
30 | |||
31 | /** |
||
32 | * Location |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $loc; |
||
37 | |||
38 | /** |
||
39 | * Last modifcation |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $lastmod; |
||
44 | |||
45 | /** |
||
46 | * Change frequency |
||
47 | * |
||
48 | * @var string |
||
49 | */ |
||
50 | protected $changefreq; |
||
51 | |||
52 | /** |
||
53 | * Priority |
||
54 | * |
||
55 | * @var float |
||
56 | */ |
||
57 | protected $priority; |
||
58 | |||
59 | /** |
||
60 | * Geo |
||
61 | * |
||
62 | * @var GeoNode |
||
63 | */ |
||
64 | protected $geo; |
||
65 | |||
66 | /** |
||
67 | * Images |
||
68 | * |
||
69 | * @var array |
||
70 | */ |
||
71 | protected $images = []; |
||
72 | |||
73 | /** |
||
74 | * Video |
||
75 | * |
||
76 | * @var VideoNode |
||
77 | */ |
||
78 | protected $video; |
||
79 | |||
80 | /** |
||
81 | * News |
||
82 | * |
||
83 | * @var NewsNode |
||
84 | */ |
||
85 | protected $news; |
||
86 | |||
87 | /** |
||
88 | * Get location |
||
89 | * |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getLoc() |
||
96 | |||
97 | /** |
||
98 | * Get last modification |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getLastmod() |
||
106 | |||
107 | /** |
||
108 | * Get change frequency |
||
109 | * |
||
110 | * @return string |
||
111 | */ |
||
112 | public function getChangefreq() |
||
119 | |||
120 | /** |
||
121 | * Get priotiy |
||
122 | * |
||
123 | * @return float |
||
124 | */ |
||
125 | public function getPriority() |
||
132 | |||
133 | /** |
||
134 | * Get geo |
||
135 | * |
||
136 | * @return GeoNode |
||
137 | */ |
||
138 | public function getGeo() |
||
142 | |||
143 | /** |
||
144 | * Get images |
||
145 | * |
||
146 | * @return array |
||
147 | */ |
||
148 | public function getImages() |
||
152 | |||
153 | /** |
||
154 | * Add image |
||
155 | * |
||
156 | * @param ImageNode $image |
||
157 | */ |
||
158 | public function addImage(ImageNode $image) |
||
162 | |||
163 | /** |
||
164 | * get Video |
||
165 | * |
||
166 | * @return VideoNode |
||
167 | */ |
||
168 | public function getVideo() |
||
172 | |||
173 | /** |
||
174 | * Get news |
||
175 | * |
||
176 | * @return NewsNode |
||
177 | */ |
||
178 | public function getNews() |
||
182 | |||
183 | /** |
||
184 | * Set location |
||
185 | * |
||
186 | * @param string $loc |
||
187 | * |
||
188 | * @throws \Exception |
||
189 | */ |
||
190 | public function setLoc($loc) |
||
197 | |||
198 | /** |
||
199 | * Set last modifiction date |
||
200 | * |
||
201 | * @param string $lastmod |
||
202 | */ |
||
203 | public function setLastmod($lastmod) |
||
210 | |||
211 | /** |
||
212 | * Set change frequency |
||
213 | * |
||
214 | * @param string $changefreq One of the Node::CHANGE_FREQ_* constants. |
||
215 | * |
||
216 | * @throws \Exception |
||
217 | */ |
||
218 | public function setChangefreq($changefreq) |
||
235 | |||
236 | /** |
||
237 | * Set priority |
||
238 | * |
||
239 | * @param float $priority |
||
240 | * |
||
241 | * @throws \Exception |
||
242 | */ |
||
243 | public function setPriority($priority) |
||
256 | |||
257 | /** |
||
258 | * Set geo |
||
259 | * |
||
260 | * @param GeoNode $geo |
||
261 | */ |
||
262 | public function setGeo(GeoNode $geo) |
||
266 | |||
267 | /** |
||
268 | * Set images |
||
269 | * |
||
270 | * @param array $images |
||
271 | */ |
||
272 | public function setImages(array $images) |
||
276 | |||
277 | /** |
||
278 | * Set video |
||
279 | * |
||
280 | * @param VideoNode $video |
||
281 | */ |
||
282 | public function setVideo(VideoNode $video) |
||
286 | |||
287 | /** |
||
288 | * Set news |
||
289 | * |
||
290 | * @param NewsNode $news |
||
291 | */ |
||
292 | public function setNews(NewsNode $news) |
||
296 | } |
||
297 |