|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the Zikula package. |
|
5
|
|
|
* |
|
6
|
|
|
* Copyright Zikula Foundation - http://zikula.org/ |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace Zikula\ExtensionsModule\Entity; |
|
13
|
|
|
|
|
14
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
15
|
|
|
use Zikula\Core\Doctrine\EntityAccess; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Extension Entity. |
|
19
|
|
|
* |
|
20
|
|
|
* @ORM\Entity(repositoryClass="Zikula\ExtensionsModule\Entity\Repository\ExtensionRepository") |
|
21
|
|
|
* @ORM\Table(name="modules") |
|
22
|
|
|
*/ |
|
23
|
|
|
class ExtensionEntity extends EntityAccess |
|
24
|
|
|
{ |
|
25
|
|
|
/** |
|
26
|
|
|
* @ORM\Id |
|
27
|
|
|
* @ORM\GeneratedValue |
|
28
|
|
|
* @ORM\Column(type="integer") |
|
29
|
|
|
* @var integer |
|
30
|
|
|
*/ |
|
31
|
|
|
private $id; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @ORM\Column(type="string", length=64) |
|
35
|
|
|
* @var string |
|
36
|
|
|
*/ |
|
37
|
|
|
private $name; |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* @ORM\Column(type="string", length=64) |
|
41
|
|
|
* @var string |
|
42
|
|
|
*/ |
|
43
|
|
|
// private $namespace; |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* @ORM\Column(type="integer", length=2) |
|
47
|
|
|
* @var integer |
|
48
|
|
|
*/ |
|
49
|
|
|
private $type; |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* @ORM\Column(type="string", length=64) |
|
53
|
|
|
* @var string |
|
54
|
|
|
*/ |
|
55
|
|
|
private $displayname; |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* @ORM\Column(type="string", length=64) |
|
59
|
|
|
* @var string |
|
60
|
|
|
*/ |
|
61
|
|
|
private $url; |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @ORM\Column(type="string", length=255) |
|
65
|
|
|
* @var string |
|
66
|
|
|
*/ |
|
67
|
|
|
private $description; |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* @ORM\Column(type="string", length=10) |
|
71
|
|
|
* @var string |
|
72
|
|
|
*/ |
|
73
|
|
|
private $version; |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* @ORM\Column(type="array") |
|
77
|
|
|
* @var array |
|
78
|
|
|
*/ |
|
79
|
|
|
private $capabilities = []; |
|
80
|
|
|
|
|
81
|
|
|
/** |
|
82
|
|
|
* @ORM\Column(type="integer", length=2) |
|
83
|
|
|
* @var integer |
|
84
|
|
|
*/ |
|
85
|
|
|
private $state; |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* @ORM\Column(type="array") |
|
89
|
|
|
* @var array |
|
90
|
|
|
*/ |
|
91
|
|
|
private $securityschema = []; |
|
92
|
|
|
|
|
93
|
|
|
/** |
|
94
|
|
|
* @ORM\Column(type="string", length=64) |
|
95
|
|
|
* @var string |
|
96
|
|
|
*/ |
|
97
|
|
|
private $core_min; |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* @ORM\Column(type="string", length=64) |
|
101
|
|
|
* @var string |
|
102
|
|
|
*/ |
|
103
|
|
|
private $core_max; |
|
104
|
|
|
|
|
105
|
|
|
public function getId() |
|
106
|
|
|
{ |
|
107
|
|
|
return $this->id; |
|
108
|
|
|
} |
|
109
|
|
|
|
|
110
|
|
|
public function setId($id) |
|
111
|
|
|
{ |
|
112
|
|
|
$this->id = $id; |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
public function getName() |
|
116
|
|
|
{ |
|
117
|
|
|
return $this->name; |
|
118
|
|
|
} |
|
119
|
|
|
|
|
120
|
|
|
public function setName($name) |
|
121
|
|
|
{ |
|
122
|
|
|
$this->name = $name; |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
// public function getNamespace() |
|
|
|
|
|
|
126
|
|
|
// { |
|
127
|
|
|
// return $this->namespace; |
|
128
|
|
|
// } |
|
129
|
|
|
// |
|
130
|
|
|
// public function setNamespace($namespace) |
|
131
|
|
|
// { |
|
132
|
|
|
// $this->namespace = $namespace; |
|
133
|
|
|
// } |
|
134
|
|
|
|
|
135
|
|
|
public function getType() |
|
136
|
|
|
{ |
|
137
|
|
|
return $this->type; |
|
138
|
|
|
} |
|
139
|
|
|
|
|
140
|
|
|
public function setType($type) |
|
141
|
|
|
{ |
|
142
|
|
|
$this->type = $type; |
|
143
|
|
|
} |
|
144
|
|
|
|
|
145
|
|
|
public function getDisplayname() |
|
146
|
|
|
{ |
|
147
|
|
|
return $this->displayname; |
|
148
|
|
|
} |
|
149
|
|
|
|
|
150
|
|
|
public function setDisplayname($displayname) |
|
151
|
|
|
{ |
|
152
|
|
|
$this->displayname = $displayname; |
|
153
|
|
|
} |
|
154
|
|
|
|
|
155
|
|
|
public function getUrl() |
|
156
|
|
|
{ |
|
157
|
|
|
return $this->url; |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
public function setUrl($url) |
|
161
|
|
|
{ |
|
162
|
|
|
$this->url = $url; |
|
163
|
|
|
} |
|
164
|
|
|
|
|
165
|
|
|
public function getDescription() |
|
166
|
|
|
{ |
|
167
|
|
|
return $this->description; |
|
168
|
|
|
} |
|
169
|
|
|
|
|
170
|
|
|
public function setDescription($description) |
|
171
|
|
|
{ |
|
172
|
|
|
$this->description = $description; |
|
173
|
|
|
} |
|
174
|
|
|
|
|
175
|
|
|
public function getVersion() |
|
176
|
|
|
{ |
|
177
|
|
|
return $this->version; |
|
178
|
|
|
} |
|
179
|
|
|
|
|
180
|
|
|
public function setVersion($version) |
|
181
|
|
|
{ |
|
182
|
|
|
$this->version = $version; |
|
183
|
|
|
} |
|
184
|
|
|
|
|
185
|
|
|
public function getCapabilities() |
|
186
|
|
|
{ |
|
187
|
|
|
return $this->capabilities; |
|
188
|
|
|
} |
|
189
|
|
|
|
|
190
|
|
|
public function setCapabilities($capabilities) |
|
191
|
|
|
{ |
|
192
|
|
|
$this->capabilities = $capabilities; |
|
193
|
|
|
} |
|
194
|
|
|
|
|
195
|
|
|
public function getState() |
|
196
|
|
|
{ |
|
197
|
|
|
return $this->state; |
|
198
|
|
|
} |
|
199
|
|
|
|
|
200
|
|
|
public function setState($state) |
|
201
|
|
|
{ |
|
202
|
|
|
$this->state = $state; |
|
203
|
|
|
} |
|
204
|
|
|
|
|
205
|
|
|
public function getSecurityschema() |
|
206
|
|
|
{ |
|
207
|
|
|
return $this->securityschema; |
|
208
|
|
|
} |
|
209
|
|
|
|
|
210
|
|
|
public function setSecurityschema($securityschema) |
|
211
|
|
|
{ |
|
212
|
|
|
$this->securityschema = $securityschema; |
|
213
|
|
|
} |
|
214
|
|
|
|
|
215
|
|
|
public function getCore_min() |
|
216
|
|
|
{ |
|
217
|
|
|
return $this->core_min; |
|
218
|
|
|
} |
|
219
|
|
|
|
|
220
|
|
|
public function setCore_min($core_min) |
|
221
|
|
|
{ |
|
222
|
|
|
$this->core_min = $core_min; |
|
223
|
|
|
} |
|
224
|
|
|
|
|
225
|
|
|
public function getCore_max() |
|
226
|
|
|
{ |
|
227
|
|
|
return $this->core_max; |
|
228
|
|
|
} |
|
229
|
|
|
|
|
230
|
|
|
public function setCore_max($core_max) |
|
231
|
|
|
{ |
|
232
|
|
|
$this->core_max = $core_max; |
|
233
|
|
|
} |
|
234
|
|
|
|
|
235
|
|
|
public function setCorecompatibility($coreCompatibility) |
|
236
|
|
|
{ |
|
237
|
|
|
// @todo temporarily use core_min to store the string - rename and remove core_max |
|
238
|
|
|
$this->core_min = $coreCompatibility; |
|
239
|
|
|
} |
|
240
|
|
|
} |
|
241
|
|
|
|
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.