Failed Conditions
Pull Request — 4.0 (#3723)
by Kiyotaka
07:29
created

Plugin::getId()   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 0
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 1
if (!class_exists('\Eccube\Entity\Plugin')) {
19
    /**
20
     * Plugin
21
     *
22
     * @ORM\Table(name="dtb_plugin")
23
     * @ORM\InheritanceType("SINGLE_TABLE")
24
     * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
25
     * @ORM\HasLifecycleCallbacks()
26
     * @ORM\Entity(repositoryClass="Eccube\Repository\PluginRepository")
27
     */
28
    class Plugin extends \Eccube\Entity\AbstractEntity
29
    {
30
        /**
31
         * @var int
32
         *
33
         * @ORM\Column(name="id", type="integer", options={"unsigned":true})
34
         * @ORM\Id
35
         * @ORM\GeneratedValue(strategy="IDENTITY")
36
         */
37
        private $id;
38
39
        /**
40
         * @var string
41
         *
42
         * @ORM\Column(name="name", type="string", length=255)
43
         */
44
        private $name;
45
46
        /**
47
         * @var string
48
         *
49
         * @ORM\Column(name="code", type="string", length=255)
50
         */
51
        private $code;
52
53
        /**
54
         * @var boolean
55
         *
56
         * @ORM\Column(name="enabled", type="boolean", options={"default":false})
57
         */
58
        private $enabled = false;
59
60
        /**
61
         * @var string
62
         *
63
         * @ORM\Column(name="version", type="string", length=255)
64
         */
65
        private $version;
66
67
        /**
68
         * @var string
69
         *
70
         * @ORM\Column(name="source", type="string", length=255)
71
         */
72
        private $source;
73
74
        /**
75
         * @var boolean
76
         * @ORM\Column(name="initialized", type="boolean", options={"default":false})
77
         */
78
        private $initialized = false;
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
         * Get id.
96
         *
97
         * @return int
98
         */
99
        public function getId()
100
        {
101
            return $this->id;
102
        }
103
104
        /**
105 40
         * Set name.
106
         *
107 40
         * @param string $name
108
         *
109
         * @return Plugin
110
         */
111
        public function setName($name)
112
        {
113
            $this->name = $name;
114
115
            return $this;
116
        }
117
118
        /**
119
         * Get name.
120
         *
121
         * @return string
122
         */
123
        public function getName()
124
        {
125
            return $this->name;
126
        }
127 40
128
        /**
129 40
         * Set code.
130
         *
131 40
         * @param string $code
132
         *
133
         * @return Plugin
134
         */
135
        public function setCode($code)
136
        {
137
            $this->code = $code;
138
139
            return $this;
140
        }
141
142
        /**
143
         * Get code.
144
         *
145
         * @return string
146
         */
147
        public function getCode()
148
        {
149
            return $this->code;
150
        }
151 40
152
        /**
153 40
         * Set enabled.
154
         *
155 40
         * @param boolean $enabled
156
         *
157
         * @return Plugin
158
         */
159
        public function setEnabled($enabled)
160
        {
161
            $this->enabled = $enabled;
162
163
            return $this;
164
        }
165
166
        /**
167
         * Get enabled.
168
         *
169
         * @return boolean
170
         */
171
        public function isEnabled()
172
        {
173
            return $this->enabled;
174
        }
175 1
176
        /**
177 1
         * Set version.
178
         *
179 1
         * @param string $version
180
         *
181
         * @return Plugin
182
         */
183
        public function setVersion($version)
184
        {
185
            $this->version = $version;
186
187
            return $this;
188
        }
189
190
        /**
191
         * Get version.
192
         *
193
         * @return string
194
         */
195
        public function getVersion()
196
        {
197
            return $this->version;
198
        }
199 40
200
        /**
201 40
         * Set source.
202
         *
203 40
         * @param string $source
204
         *
205
         * @return Plugin
206
         */
207
        public function setSource($source)
208
        {
209
            $this->source = $source;
210
211
            return $this;
212
        }
213
214
        /**
215
         * Get source.
216
         *
217
         * @return string
218
         */
219
        public function getSource()
220
        {
221
            return $this->source;
222
        }
223 1
224
        /**
225 1
         * Get initialized.
226
         *
227 1
         * @return bool
228
         */
229
        public function isInitialized(): bool
230
        {
231
            return $this->initialized;
232
        }
233
234
        /**
235
         * Set initialized.
236
         *
237
         * @param bool $initialized
238
         *
239
         * @return Plugin
240
         */
241
        public function setInitialized(bool $initialized)
242
        {
243
            $this->initialized = $initialized;
244
245
            return $this;
246
        }
247 1
248
        /**
249 1
         * Set createDate.
250
         *
251 1
         * @param \DateTime $createDate
252
         *
253
         * @return Plugin
254
         */
255
        public function setCreateDate($createDate)
256
        {
257
            $this->create_date = $createDate;
258
259
            return $this;
260
        }
261
262
        /**
263
         * Get createDate.
264
         *
265
         * @return \DateTime
266
         */
267
        public function getCreateDate()
268
        {
269
            return $this->create_date;
270
        }
271 1
272
        /**
273 1
         * Set updateDate.
274
         *
275 1
         * @param \DateTime $updateDate
276
         *
277
         * @return Plugin
278
         */
279
        public function setUpdateDate($updateDate)
280
        {
281
            $this->update_date = $updateDate;
282
283
            return $this;
284
        }
285
286
        /**
287
         * Get updateDate.
288
         *
289
         * @return \DateTime
290
         */
291
        public function getUpdateDate()
292
        {
293
            return $this->update_date;
294
        }
295 1
    }
296
}
297