ViewReference::setSlug()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Victoire\Bundle\ViewReferenceBundle\ViewReference;
4
5
class ViewReference
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
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
    protected $children;
18
    protected $parent;
19
20
    public function __construct($id = null)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
21
    {
22
        $this->id = $id;
23
        $this->children = [];
24
    }
25
26
    /**
27
     * looks like ref_{view.id}[_{view.businessEntity.id}].
28
     *
29
     * @return string
30
     */
31
    public function getId()
32
    {
33
        return $this->id;
34
    }
35
36
    /**
37
     * @param string $id
38
     */
39
    public function setId($id)
40
    {
41
        $this->id = $id;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getLocale()
48
    {
49
        return $this->locale;
50
    }
51
52
    /**
53
     * @param string $locale
54
     */
55
    public function setLocale($locale)
56
    {
57
        $this->locale = $locale;
58
    }
59
60
    /**
61
     * @return mixed
62
     */
63
    public function getName()
64
    {
65
        return $this->name;
66
    }
67
68
    /**
69
     * @param mixed $name
70
     */
71
    public function setName($name)
72
    {
73
        $this->name = $name;
74
    }
75
76
    /**
77
     * @return mixed
78
     */
79
    public function getViewId()
80
    {
81
        return $this->viewId;
82
    }
83
84
    /**
85
     * @param mixed $viewId
86
     */
87
    public function setViewId($viewId)
88
    {
89
        $this->viewId = $viewId;
90
    }
91
92
    /**
93
     * @return mixed
94
     */
95
    public function getViewNamespace()
96
    {
97
        return $this->viewNamespace;
98
    }
99
100
    /**
101
     * @param mixed $viewNamespace
102
     */
103
    public function setViewNamespace($viewNamespace)
104
    {
105
        $this->viewNamespace = $viewNamespace;
106
    }
107
108
    /**
109
     * @return mixed
110
     */
111
    public function getSlug()
112
    {
113
        return $this->slug;
114
    }
115
116
    /**
117
     * @param mixed $slug
118
     */
119
    public function setSlug($slug)
120
    {
121
        $this->slug = $slug;
122
    }
123
124
    /**
125
     * @return string
126
     */
127
    public function getUrl()
128
    {
129
        return $this->url;
130
    }
131
132
    /**
133
     * @param string $url
134
     */
135
    public function setUrl($url)
136
    {
137
        $this->url = $url;
138
    }
139
140
    /**
141
     * @return int
142
     */
143
    public function getParent()
144
    {
145
        return $this->parent;
146
    }
147
148
    /**
149
     * @param int $parent
150
     */
151
    public function setParent($parent)
152
    {
153
        $this->parent = $parent;
154
    }
155
156
    /**
157
     * @return ViewReference[]
158
     */
159
    public function getChildren()
160
    {
161
        return $this->children;
162
    }
163
164
    /**
165
     * @param ViewReference[] $children
166
     */
167
    public function setChildren($children)
168
    {
169
        $this->children = $children;
170
    }
171
172
    /**
173
     * @param ViewReference $child
174
     */
175
    public function addChild($child)
176
    {
177
        $this->children[] = $child;
178
    }
179
}
180