Failed Conditions
Pull Request — experimental/sf (#29)
by Kentaro
50:12 queued 39:05
created

Plugin::getCreateDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Eccube\Entity;
15
16
use Doctrine\ORM\Mapping as ORM;
17
18
/**
19
 * Plugin
20
 *
21
 * @ORM\Table(name="dtb_plugin")
22
 * @ORM\InheritanceType("SINGLE_TABLE")
23
 * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
24
 * @ORM\HasLifecycleCallbacks()
25
 * @ORM\Entity(repositoryClass="Eccube\Repository\PluginRepository")
26
 */
27
class Plugin extends \Eccube\Entity\AbstractEntity
28
{
29
    /**
30
     * @var int
31
     *
32
     * @ORM\Column(name="id", type="integer", options={"unsigned":true})
33
     * @ORM\Id
34
     * @ORM\GeneratedValue(strategy="IDENTITY")
35
     */
36
    private $id;
37
38
    /**
39
     * @var string
40
     *
41
     * @ORM\Column(name="name", type="string", length=255)
42
     */
43
    private $name;
44
45
    /**
46
     * @var string
47
     *
48
     * @ORM\Column(name="code", type="string", length=255)
49
     */
50
    private $code;
51
52
    /**
53
     * @var string
54
     *
55
     * @ORM\Column(name="class_name", type="string", length=255)
56
     */
57
    private $class_name;
58
59
    /**
60
     * @var boolean
61
     *
62
     * @ORM\Column(name="enabled", type="boolean", options={"default":false})
63
     */
64
    private $enabled = false;
65
66
    /**
67
     * @var string
68
     *
69
     * @ORM\Column(name="version", type="string", length=255)
70
     */
71
    private $version;
72
73
    /**
74
     * @var string
75
     *
76
     * @ORM\Column(name="source", type="string", length=255)
77
     */
78
    private $source;
79
80
    /**
81
     * @var \DateTime
82
     *
83
     * @ORM\Column(name="create_date", type="datetimetz")
84
     */
85
    private $create_date;
86
87
    /**
88
     * @var \DateTime
89
     *
90
     * @ORM\Column(name="update_date", type="datetimetz")
91
     */
92
    private $update_date;
93
94
    /**
95
     * @var \Doctrine\Common\Collections\Collection
96
     *
97
     * @ORM\OneToMany(targetEntity="Eccube\Entity\PluginEventHandler", mappedBy="Plugin", cascade={"persist","remove"})
98
     */
99
    private $PluginEventHandlers;
100
101
    /**
102
     * Constructor
103
     */
104 40
    public function __construct()
105
    {
106 40
        $this->PluginEventHandlers = new \Doctrine\Common\Collections\ArrayCollection();
107
    }
108
109
    /**
110
     * Get id.
111
     *
112
     * @return int
113
     */
114
    public function getId()
115
    {
116
        return $this->id;
117
    }
118
119
    /**
120
     * Set name.
121
     *
122
     * @param string $name
123
     *
124
     * @return Plugin
125
     */
126 40
    public function setName($name)
127
    {
128 40
        $this->name = $name;
129
130 40
        return $this;
131
    }
132
133
    /**
134
     * Get name.
135
     *
136
     * @return string
137
     */
138
    public function getName()
139
    {
140
        return $this->name;
141
    }
142
143
    /**
144
     * Set code.
145
     *
146
     * @param string $code
147
     *
148
     * @return Plugin
149
     */
150 40
    public function setCode($code)
151
    {
152 40
        $this->code = $code;
153
154 40
        return $this;
155
    }
156
157
    /**
158
     * Get code.
159
     *
160
     * @return string
161
     */
162
    public function getCode()
163
    {
164
        return $this->code;
165
    }
166
167
    /**
168
     * Set className.
169
     *
170
     * @param string $className
171
     *
172
     * @return Plugin
173
     */
174 1
    public function setClassName($className)
175
    {
176 1
        $this->class_name = $className;
177
178 1
        return $this;
179
    }
180
181
    /**
182
     * Get className.
183
     *
184
     * @return string
185
     */
186
    public function getClassName()
187
    {
188
        return $this->class_name;
189
    }
190
191
    /**
192
     * Set enabled.
193
     *
194
     * @param boolean $enabled
195
     *
196
     * @return Plugin
197
     */
198 40
    public function setEnabled($enabled)
199
    {
200 40
        $this->enabled = $enabled;
201
202 40
        return $this;
203
    }
204
205
    /**
206
     * Get enabled.
207
     *
208
     * @return boolean
209
     */
210
    public function isEnabled()
211
    {
212
        return $this->enabled;
213
    }
214
215
    /**
216
     * Set version.
217
     *
218
     * @param string $version
219
     *
220
     * @return Plugin
221
     */
222 1
    public function setVersion($version)
223
    {
224 1
        $this->version = $version;
225
226 1
        return $this;
227
    }
228
229
    /**
230
     * Get version.
231
     *
232
     * @return string
233
     */
234
    public function getVersion()
235
    {
236
        return $this->version;
237
    }
238
239
    /**
240
     * Set source.
241
     *
242
     * @param string $source
243
     *
244
     * @return Plugin
245
     */
246 1
    public function setSource($source)
247
    {
248 1
        $this->source = $source;
249
250 1
        return $this;
251
    }
252
253
    /**
254
     * Get source.
255
     *
256
     * @return string
257
     */
258
    public function getSource()
259
    {
260
        return $this->source;
261
    }
262
263
    /**
264
     * Set createDate.
265
     *
266
     * @param \DateTime $createDate
267
     *
268
     * @return Plugin
269
     */
270 1
    public function setCreateDate($createDate)
271
    {
272 1
        $this->create_date = $createDate;
273
274 1
        return $this;
275
    }
276
277
    /**
278
     * Get createDate.
279
     *
280
     * @return \DateTime
281
     */
282
    public function getCreateDate()
283
    {
284
        return $this->create_date;
285
    }
286
287
    /**
288
     * Set updateDate.
289
     *
290
     * @param \DateTime $updateDate
291
     *
292
     * @return Plugin
293
     */
294 1
    public function setUpdateDate($updateDate)
295
    {
296 1
        $this->update_date = $updateDate;
297
298 1
        return $this;
299
    }
300
301
    /**
302
     * Get updateDate.
303
     *
304
     * @return \DateTime
305
     */
306
    public function getUpdateDate()
307
    {
308
        return $this->update_date;
309
    }
310
311
    /**
312
     * Add pluginEventHandler.
313
     *
314
     * @param \Eccube\Entity\PluginEventHandler $pluginEventHandler
315
     *
316
     * @return Plugin
317
     */
318
    public function addPluginEventHandler(\Eccube\Entity\PluginEventHandler $pluginEventHandler)
319
    {
320
        $this->PluginEventHandlers[] = $pluginEventHandler;
321
322
        return $this;
323
    }
324
325
    /**
326
     * Remove pluginEventHandler.
327
     *
328
     * @param \Eccube\Entity\PluginEventHandler $pluginEventHandler
329
     *
330
     * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
331
     */
332
    public function removePluginEventHandler(\Eccube\Entity\PluginEventHandler $pluginEventHandler)
333
    {
334
        return $this->PluginEventHandlers->removeElement($pluginEventHandler);
335
    }
336
337
    /**
338
     * Get pluginEventHandlers.
339
     *
340
     * @return \Doctrine\Common\Collections\Collection
341
     */
342
    public function getPluginEventHandlers()
343
    {
344
        return $this->PluginEventHandlers;
345
    }
346
}
347