Completed
Push — master ( fad9f9...8658c1 )
by Jean-Christophe
01:44
created

Url   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 9
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 77
rs 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getLocation() 0 3 1
A getLastModified() 0 3 1
A getChangeFrequency() 0 3 1
A getPriority() 0 3 1
A setLocation() 0 3 1
A setLastModified() 0 3 1
A setChangeFrequency() 0 3 1
A setPriority() 0 3 1
1
<?php
2
3
namespace Ubiquity\seo;
4
5
/**
6
 * Url for Seo module, use for sitemap generation
7
 * @author jc
8
 *
9
 */
10
class Url {
11
	private $location;
12
	private $lastModified;
13
	private $changeFrequency;
14
	private $priority;
15
16
	public function __construct($location, $lastModified=null, $changeFrequency="daily", $priority="0.5") {
17
		$this->location=$location;
18
		$this->lastModified=$lastModified;
19
		$this->changeFrequency=$changeFrequency;
20
		$this->priority=$priority;
21
	}
22
23
	/**
24
	 *
25
	 * @return mixed
26
	 */
27
	public function getLocation() {
28
		return $this->location;
29
	}
30
31
	/**
32
	 *
33
	 * @return string
34
	 */
35
	public function getLastModified() {
36
		return $this->lastModified;
37
	}
38
39
	/**
40
	 *
41
	 * @return string
42
	 */
43
	public function getChangeFrequency() {
44
		return $this->changeFrequency;
45
	}
46
47
	/**
48
	 *
49
	 * @return string
50
	 */
51
	public function getPriority() {
52
		return $this->priority;
53
	}
54
55
	/**
56
	 *
57
	 * @param mixed $location
58
	 */
59
	public function setLocation($location) {
60
		$this->location=$location;
61
	}
62
63
	/**
64
	 *
65
	 * @param string $lastModified
66
	 */
67
	public function setLastModified($lastModified) {
68
		$this->lastModified=$lastModified;
69
	}
70
71
	/**
72
	 *
73
	 * @param string $changeFrequency
74
	 */
75
	public function setChangeFrequency($changeFrequency) {
76
		$this->changeFrequency=$changeFrequency;
77
	}
78
79
	/**
80
	 *
81
	 * @param string $priority
82
	 */
83
	public function setPriority($priority) {
84
		$this->priority=$priority;
85
	}
86
}
87
88