| 1 | <?php |
||
| 14 | final class Url implements UrlInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Always visit url. |
||
| 18 | */ |
||
| 19 | public const FREQUENCE_ALWAYS = 'always'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Visit url every hour. |
||
| 23 | */ |
||
| 24 | public const FREQUENCE_HOURLY = 'hourly'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Visit url every day. |
||
| 28 | */ |
||
| 29 | public const FREQUENCE_DAILY = 'daily'; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Visit url every week. |
||
| 33 | */ |
||
| 34 | public const FREQUENCE_WEEKLY = 'weekly'; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Visit url every month. |
||
| 38 | */ |
||
| 39 | public const FREQUENCE_MONTHLY = 'monthly'; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Visit url every year. |
||
| 43 | */ |
||
| 44 | public const FREQUENCE_YEARLY = 'yearly'; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Never visit url again. |
||
| 48 | */ |
||
| 49 | public const FREQUENCE_NEVER = 'never'; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @var string |
||
| 53 | */ |
||
| 54 | private $loc; |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @var \DateTime|null |
||
| 58 | */ |
||
| 59 | private $lastMod; |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @var string|null |
||
| 63 | */ |
||
| 64 | private $changeFreq; |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @var int|null |
||
| 68 | */ |
||
| 69 | private $priority; |
||
| 70 | |||
| 71 | public function __construct(string $loc, ?int $priority = null, ?string $changeFreq = null, ?\DateTime $lastMod = null) |
||
| 78 | |||
| 79 | public function getChangeFreq(): ?string |
||
| 83 | |||
| 84 | public function getLastMod(): ?\DateTime |
||
| 88 | |||
| 89 | public function getLoc(): string |
||
| 93 | |||
| 94 | public function getPriority(): ?int |
||
| 98 | } |
||
| 99 |