Completed
Push — sf/composer-json ( f5fb05...58ca75 )
by Kiyotaka
05:48
created

Plugin::__construct()   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 \DateTime
76
         *
77
         * @ORM\Column(name="create_date", type="datetimetz")
78
         */
79
        private $create_date;
80
81
        /**
82
         * @var \DateTime
83
         *
84
         * @ORM\Column(name="update_date", type="datetimetz")
85
         */
86
        private $update_date;
87
88
        /**
89
         * Get id.
90
         *
91
         * @return int
92
         */
93
        public function getId()
94
        {
95
            return $this->id;
96
        }
97
98
        /**
99
         * Set name.
100
         *
101
         * @param string $name
102
         *
103
         * @return Plugin
104
         */
105
        public function setName($name)
106
        {
107
            $this->name = $name;
108
109
            return $this;
110
        }
111
112
        /**
113
         * Get name.
114
         *
115
         * @return string
116
         */
117
        public function getName()
118
        {
119
            return $this->name;
120
        }
121
122
        /**
123
         * Set code.
124
         *
125
         * @param string $code
126
         *
127
         * @return Plugin
128
         */
129
        public function setCode($code)
130
        {
131
            $this->code = $code;
132
133
            return $this;
134
        }
135
136
        /**
137
         * Get code.
138
         *
139
         * @return string
140
         */
141
        public function getCode()
142
        {
143
            return $this->code;
144
        }
145
146
        /**
147
         * Set enabled.
148
         *
149
         * @param boolean $enabled
150
         *
151
         * @return Plugin
152
         */
153
        public function setEnabled($enabled)
154
        {
155
            $this->enabled = $enabled;
156
157
            return $this;
158
        }
159
160
        /**
161
         * Get enabled.
162
         *
163
         * @return boolean
164
         */
165
        public function isEnabled()
166
        {
167
            return $this->enabled;
168
        }
169
170
        /**
171
         * Set version.
172
         *
173
         * @param string $version
174
         *
175
         * @return Plugin
176
         */
177
        public function setVersion($version)
178
        {
179
            $this->version = $version;
180
181
            return $this;
182
        }
183
184
        /**
185
         * Get version.
186
         *
187
         * @return string
188
         */
189
        public function getVersion()
190
        {
191
            return $this->version;
192
        }
193
194
        /**
195
         * Set source.
196
         *
197
         * @param string $source
198
         *
199
         * @return Plugin
200
         */
201
        public function setSource($source)
202
        {
203
            $this->source = $source;
204
205
            return $this;
206
        }
207
208
        /**
209
         * Get source.
210
         *
211
         * @return string
212
         */
213
        public function getSource()
214
        {
215
            return $this->source;
216
        }
217
218
        /**
219
         * Set createDate.
220
         *
221
         * @param \DateTime $createDate
222
         *
223
         * @return Plugin
224
         */
225
        public function setCreateDate($createDate)
226
        {
227
            $this->create_date = $createDate;
228
229
            return $this;
230
        }
231
232
        /**
233
         * Get createDate.
234
         *
235
         * @return \DateTime
236
         */
237
        public function getCreateDate()
238
        {
239
            return $this->create_date;
240
        }
241
242
        /**
243
         * Set updateDate.
244
         *
245
         * @param \DateTime $updateDate
246
         *
247
         * @return Plugin
248
         */
249
        public function setUpdateDate($updateDate)
250
        {
251
            $this->update_date = $updateDate;
252
253
            return $this;
254
        }
255
256
        /**
257
         * Get updateDate.
258
         *
259
         * @return \DateTime
260
         */
261
        public function getUpdateDate()
262
        {
263
            return $this->update_date;
264
        }
265
    }
266
}
267