Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
Url.php
Go to the documentation of this file.
1<?php
2
3namespace Ubiquity\seo;
4
6
12#[\AllowDynamicProperties()]
13class Url {
14 private $location;
17 private $priority;
18 private $existing;
19 private $valid;
20
21 public function __construct($location = "", $lastModified = null, $changeFrequency = "daily", $priority = "0.5") {
22 $this->location = $location;
23 $this->lastModified = $lastModified;
24 $this->changeFrequency = $changeFrequency;
25 $this->priority = $priority;
26 $this->existing = false;
27 $this->valid = true;
28 }
29
34 public function getLocation() {
35 return $this->location;
36 }
37
42 public function getLastModified() {
44 }
45
50 public function getChangeFrequency() {
52 }
53
58 public function getPriority() {
59 return $this->priority;
60 }
61
66 public function setLocation($location) {
67 $this->location = $location;
68 }
69
74 public function setLastModified($lastModified) {
75 $this->lastModified = $lastModified;
76 }
77
83 $this->changeFrequency = $changeFrequency;
84 }
85
90 public function setPriority($priority) {
91 $this->priority = $priority;
92 }
93
97 public function getExisting() {
98 return $this->existing;
99 }
100
104 public function setExisting($existing) {
105 $this->existing = $existing;
106 }
107
108 public static function fromArray($array, $existing = true) {
109 $array["existing"] = $existing;
110 $object = new Url();
111 URequest::setValuesToObject($object, $array);
112 return $object;
113 }
114
118 public function getValid() {
119 return $this->valid;
120 }
121
125 public function setValid($valid) {
126 $this->valid = $valid;
127 }
128
129
130}
131
Url for Seo module, use for sitemap generation.
Definition Url.php:13
static fromArray($array, $existing=true)
Definition Url.php:108
__construct($location="", $lastModified=null, $changeFrequency="daily", $priority="0.5")
Definition Url.php:21
getChangeFrequency()
Definition Url.php:50
setLocation($location)
Definition Url.php:66
setChangeFrequency($changeFrequency)
Definition Url.php:82
setPriority($priority)
Definition Url.php:90
getLastModified()
Definition Url.php:42
setValid($valid)
Definition Url.php:125
setExisting($existing)
Definition Url.php:104
setLastModified($lastModified)
Definition Url.php:74
Http Request utilities, wrapper for accessing to $_GET, $_POST and php://input.
Definition URequest.php:18