Ubiquity  2.0.2
php rapid development framework
Url.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Ubiquity\seo;
4 
6 
12 class Url {
13  private $location;
14  private $lastModified;
16  private $priority;
17  private $existing;
18  private $valid;
19 
20  public function __construct($location="", $lastModified=null, $changeFrequency="daily", $priority="0.5") {
21  $this->location=$location;
22  $this->lastModified=$lastModified;
23  $this->changeFrequency=$changeFrequency;
24  $this->priority=$priority;
25  $this->existing=false;
26  $this->valid=true;
27  }
28 
33  public function getLocation() {
34  return $this->location;
35  }
36 
41  public function getLastModified() {
42  return $this->lastModified;
43  }
44 
49  public function getChangeFrequency() {
51  }
52 
57  public function getPriority() {
58  return $this->priority;
59  }
60 
65  public function setLocation($location) {
66  $this->location=$location;
67  }
68 
73  public function setLastModified($lastModified) {
74  $this->lastModified=$lastModified;
75  }
76 
82  $this->changeFrequency=$changeFrequency;
83  }
84 
89  public function setPriority($priority) {
90  $this->priority=$priority;
91  }
95  public function getExisting() {
96  return $this->existing;
97  }
98 
102  public function setExisting($existing) {
103  $this->existing = $existing;
104  }
105 
106  public static function fromArray($array,$existing=true){
107  $array["existing"]=$existing;
108  $object=new Url();
109  URequest::setValuesToObject($object,$array);
110  return $object;
111  }
115  public function getValid() {
116  return $this->valid;
117  }
118 
122  public function setValid($valid) {
123  $this->valid = $valid;
124  }
125 
126 
127 }
128 
__construct($location="", $lastModified=null, $changeFrequency="daily", $priority="0.5")
Definition: Url.php:20
static fromArray($array, $existing=true)
Definition: Url.php:106
setChangeFrequency($changeFrequency)
Definition: Url.php:81
setLocation($location)
Definition: Url.php:65
setValid($valid)
Definition: Url.php:122
static setValuesToObject($object, $values=null)
Affects member to member the values of the associative array $values to the members of the object $ob...
Definition: URequest.php:21
getChangeFrequency()
Definition: Url.php:49
getLastModified()
Definition: Url.php:41
setLastModified($lastModified)
Definition: Url.php:73
setPriority($priority)
Definition: Url.php:89
Url for Seo module, use for sitemap generation.
Definition: Url.php:12
setExisting($existing)
Definition: Url.php:102