1 | <?php |
||
10 | class Item { |
||
11 | public $url; |
||
12 | public $lastmod; |
||
13 | public $changefreq; |
||
14 | public $priority; |
||
15 | |||
16 | /** |
||
17 | * Create a new item. |
||
18 | * |
||
19 | * @param string $url The url of the item |
||
20 | * @param int $lastmod Timestamp of the last modification |
||
21 | * @param string $changefreq How frequently the item is likely to change. |
||
22 | * Valid values: always, hourly, daily, weekly, monthly, yearly, never. |
||
23 | * @param $priority float|string The priority of the item relative to other URLs on your site. |
||
24 | * Valid values range from 0.0 to 1.0. |
||
25 | */ |
||
26 | public function __construct($url, $lastmod, $changefreq = null, $priority = null) { |
||
32 | |||
33 | /** |
||
34 | * Helper function for creating an item for a wikipage id. |
||
35 | * |
||
36 | * @param string $id A wikipage id. |
||
37 | * @param string $changefreq How frequently the item is likely to change. |
||
38 | * Valid values: always, hourly, daily, weekly, monthly, yearly, never. |
||
39 | * @param float|string $priority The priority of the item relative to other URLs on your site. |
||
40 | * Valid values range from 0.0 to 1.0. |
||
41 | * @return Item The sitemap item. |
||
42 | */ |
||
43 | public static function createFromID($id, $changefreq = null, $priority = null) { |
||
49 | |||
50 | /** |
||
51 | * Get the XML representation of the sitemap item. |
||
52 | * |
||
53 | * @return string The XML representation. |
||
54 | */ |
||
55 | public function toXML() { |
||
66 | } |
||
67 |