1 | <?php |
||
15 | class SitemapResource |
||
16 | { |
||
17 | /** |
||
18 | * The title of the resource. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $title; |
||
23 | |||
24 | /** |
||
25 | * The absolute URL of where the resource can be accessed. |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $location; |
||
30 | |||
31 | /** |
||
32 | * The date at which the resource was last modified. |
||
33 | * |
||
34 | * @var \DateTime |
||
35 | */ |
||
36 | protected $lastModified; |
||
37 | |||
38 | /** |
||
39 | * The change frequency at which this resource is updated. |
||
40 | * |
||
41 | * @see ChangeFrequencyEnum |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $changeFrequency; |
||
45 | |||
46 | /** |
||
47 | * The priority that this resource should be given within a sitemap. |
||
48 | * |
||
49 | * @var float |
||
50 | */ |
||
51 | protected $priority; |
||
52 | |||
53 | /** |
||
54 | * SitemapResource constructor. |
||
55 | * |
||
56 | * @param string $title |
||
57 | * @param string $location |
||
58 | * @param \DateTime $lastModified |
||
59 | * @param string $changeFrequency |
||
60 | * @param float $priority |
||
61 | */ |
||
62 | 15 | public function __construct( |
|
75 | |||
76 | /** |
||
77 | * @return string |
||
78 | */ |
||
79 | 12 | public function getTitle(): string |
|
83 | |||
84 | /** |
||
85 | * @return string |
||
86 | */ |
||
87 | 11 | public function getLocation(): string |
|
91 | |||
92 | /** |
||
93 | * @return \DateTime |
||
94 | */ |
||
95 | 2 | public function getLastModified(): \DateTime |
|
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | 10 | public function getChangeFrequency(): string |
|
107 | |||
108 | /** |
||
109 | * @return float |
||
110 | */ |
||
111 | 9 | public function getPriority(): float |
|
115 | } |
||
116 |