Completed
Push — master ( d1535f...93b502 )
by Leny
06:44
created

ViewReference   A

Complexity

Total Complexity 15

Size/Duplication

Total Lines 132
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 8
Bugs 1 Features 1
Metric Value
wmc 15
c 8
b 1
f 1
lcom 0
cbo 0
dl 0
loc 132
rs 10

15 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getId() 0 4 1
A setId() 0 4 1
A getLocale() 0 4 1
A setLocale() 0 4 1
A getName() 0 4 1
A setName() 0 4 1
A getViewId() 0 4 1
A setViewId() 0 4 1
A getViewNamespace() 0 4 1
A setViewNamespace() 0 4 1
A getSlug() 0 4 1
A setSlug() 0 4 1
A getUrl() 0 4 1
A setUrl() 0 4 1
1
<?php
2
3
namespace Victoire\Bundle\ViewReferenceBundle\ViewReference;
4
5
class ViewReference
6
{
7
    protected $id;
8
    protected $locale;
9
    protected $name;
10
    protected $slug;
11
    /**
12
     * @var string built by ViewReferenceCacheRepo
13
     */
14
    protected $url;
15
    protected $viewId;
16
    protected $viewNamespace;
17
18
    public function __construct($id = null)
19
    {
20
        $this->id = $id;
21
    }
22
23
    /**
24
     * looks like ref_{view.id}[_{view.businessEntity.id}].
25
     *
26
     * @return string
27
     */
28
    public function getId()
29
    {
30
        return $this->id;
31
    }
32
33
    /**
34
     * @param string $id
35
     */
36
    public function setId($id)
37
    {
38
        $this->id = $id;
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getLocale()
45
    {
46
        return $this->locale;
47
    }
48
49
    /**
50
     * @param string $locale
51
     */
52
    public function setLocale($locale)
53
    {
54
        $this->locale = $locale;
55
    }
56
57
    /**
58
     * @return mixed
59
     */
60
    public function getName()
61
    {
62
        return $this->name;
63
    }
64
65
    /**
66
     * @param mixed $name
67
     */
68
    public function setName($name)
69
    {
70
        $this->name = $name;
71
    }
72
73
    /**
74
     * @return mixed
75
     */
76
    public function getViewId()
77
    {
78
        return $this->viewId;
79
    }
80
81
    /**
82
     * @param mixed $viewId
83
     */
84
    public function setViewId($viewId)
85
    {
86
        $this->viewId = $viewId;
87
    }
88
89
    /**
90
     * @return mixed
91
     */
92
    public function getViewNamespace()
93
    {
94
        return $this->viewNamespace;
95
    }
96
97
    /**
98
     * @param mixed $viewNamespace
99
     */
100
    public function setViewNamespace($viewNamespace)
101
    {
102
        $this->viewNamespace = $viewNamespace;
103
    }
104
105
    /**
106
     * @return mixed
107
     */
108
    public function getSlug()
109
    {
110
        return $this->slug;
111
    }
112
113
    /**
114
     * @param mixed $slug
115
     */
116
    public function setSlug($slug)
117
    {
118
        $this->slug = $slug;
119
    }
120
121
    /**
122
     * @return string
123
     */
124
    public function getUrl()
125
    {
126
        return $this->url;
127
    }
128
129
    /**
130
     * @param string $url
131
     */
132
    public function setUrl($url)
133
    {
134
        $this->url = $url;
135
    }
136
}
137