Failed Conditions
Push — sf/package-api ( 831849...a77dd1 )
by Kiyotaka
06:40
created

Plugin::isInitialized()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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
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
         * Set name.
106
         *
107
         * @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
128
        /**
129
         * Set code.
130
         *
131
         * @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
152
        /**
153
         * Set enabled.
154
         *
155
         * @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
176
        /**
177
         * Set version.
178
         *
179
         * @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
200
        /**
201
         * Set source.
202
         *
203
         * @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
224
        /**
225
         * Get initialized.
226
         * @return bool
227
         */
228
        public function isInitialized(): bool
229
        {
230
            return $this->initialized;
231
        }
232
233
        /**
234
         * Set initialized.
235
         *
236
         * @param bool $initialized
237
         *
238
         * @return Plugin
239
         */
240
        public function setInitialized(bool $initialized)
241
        {
242
            $this->initialized = $initialized;
243
244
            return $this;
245
        }
246
247
        /**
248
         * Set createDate.
249
         *
250
         * @param \DateTime $createDate
251
         *
252
         * @return Plugin
253
         */
254
        public function setCreateDate($createDate)
255
        {
256
            $this->create_date = $createDate;
257
258
            return $this;
259
        }
260
261
        /**
262
         * Get createDate.
263
         *
264
         * @return \DateTime
265
         */
266
        public function getCreateDate()
267
        {
268
            return $this->create_date;
269
        }
270
271
        /**
272
         * Set updateDate.
273
         *
274
         * @param \DateTime $updateDate
275
         *
276
         * @return Plugin
277
         */
278
        public function setUpdateDate($updateDate)
279
        {
280
            $this->update_date = $updateDate;
281
282
            return $this;
283
        }
284
285
        /**
286
         * Get updateDate.
287
         *
288
         * @return \DateTime
289
         */
290
        public function getUpdateDate()
291
        {
292
            return $this->update_date;
293
        }
294
    }
295
}
296