Passed
Push — master ( e14a05...ed0db1 )
by Gabor
05:13
created

setFilesystemDirectoryId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * WebHemi.
4
 *
5
 * PHP version 7.1
6
 *
7
 * @copyright 2012 - 2018 Gixx-web (http://www.gixx-web.com)
8
 * @license   https://opensource.org/licenses/MIT The MIT License (MIT)
9
 *
10
 * @link http://www.gixx-web.com
11
 */
12
declare(strict_types = 1);
13
14
namespace WebHemi\Data\Entity;
15
16
use WebHemi\DateTime;
17
18
/**
19
 * Class FilesystemDirectoryDataEntity
20
 */
21
class FilesystemDirectoryDataEntity extends AbstractEntity
22
{
23
    /**
24
     * @var array
25
     */
26
    protected $container = [
27
        'id_filesystem' => null,
28
        'id_application' => null,
29
        'id_filesystem_directory' => null,
30
        'description' => null,
31
        'directory_type' => null,
32
        'proxy' => null,
33
        'is_autoindex' => null,
34
        'path' => null,
35
        'basename' => null,
36
        'uri' => null,
37
        'type' => null,
38
        'title' => null,
39
    ];
40
41
    /**
42
     * @param int $identifier
43
     * @return FilesystemDirectoryDataEntity
44
     */
45 1
    public function setFilesystemId(int $identifier) : FilesystemDirectoryDataEntity
46
    {
47 1
        $this->container['id_filesystem'] = $identifier;
48
49 1
        return $this;
50
    }
51
52
    /**
53
     * @return int|null
54
     */
55 1
    public function getFilesystemId() : ? int
56
    {
57 1
        return !is_null($this->container['id_filesystem'])
58 1
            ? (int) $this->container['id_filesystem']
59 1
            : null;
60
    }
61
62
    /**
63
     * @param int $applicationIdentifier
64
     * @return FilesystemDirectoryDataEntity
65
     */
66 1
    public function setApplicationId(int $applicationIdentifier) : FilesystemDirectoryDataEntity
67
    {
68 1
        $this->container['id_application'] = $applicationIdentifier;
69
70 1
        return $this;
71
    }
72
73
    /**
74
     * @return int|null
75
     */
76 1
    public function getApplicationId() : ? int
77
    {
78 1
        return !is_null($this->container['id_application'])
79 1
            ? (int) $this->container['id_application']
80 1
            : null;
81
    }
82
83
    /**
84
     * @param int $identifier
85
     * @return FilesystemDirectoryDataEntity
86
     */
87 1
    public function setFilesystemDirectoryId(int $identifier) : FilesystemDirectoryDataEntity
88
    {
89 1
        $this->container['id_filesystem_directory'] = $identifier;
90
91 1
        return $this;
92
    }
93
94
    /**
95
     * @return int|null
96
     */
97 1
    public function getFilesystemDirectoryId() : ? int
98
    {
99 1
        return !is_null($this->container['id_filesystem_directory'])
100 1
            ? (int) $this->container['id_filesystem_directory']
101 1
            : null;
102
    }
103
104
    /**
105
     * @param string $description
106
     * @return FilesystemDirectoryDataEntity
107
     */
108 1
    public function setDescription(string $description) : FilesystemDirectoryDataEntity
109
    {
110 1
        $this->container['description'] = $description;
111
112 1
        return $this;
113
    }
114
115
    /**
116
     * @return null|string
117
     */
118 1
    public function getDescription() : ? string
119
    {
120 1
        return $this->container['description'];
121
    }
122
123
    /**
124
     * @param string $directoryType
125
     * @return FilesystemDirectoryDataEntity
126
     */
127 1
    public function setDirectoryType(string $directoryType) : FilesystemDirectoryDataEntity
128
    {
129 1
        $this->container['directory_type'] = $directoryType;
130
131 1
        return $this;
132
    }
133
134
    /**
135
     * @return null|string
136
     */
137 1
    public function getDirectoryType() : ? string
138
    {
139 1
        return $this->container['directory_type'];
140
    }
141
142
    /**
143
     * @param string $proxy
144
     * @return FilesystemDirectoryDataEntity
145
     */
146 1
    public function setProxy(string $proxy) : FilesystemDirectoryDataEntity
147
    {
148 1
        $this->container['proxy'] = $proxy;
149
150 1
        return $this;
151
    }
152
153
    /**
154
     * @return null|string
155
     */
156 1
    public function getProxy() : ? string
157
    {
158 1
        return $this->container['proxy'];
159
    }
160
161
    /**
162
     * @param bool $isAutoindex
163
     * @return FilesystemDirectoryDataEntity
164
     */
165 1
    public function setIsAutoIndex(bool $isAutoindex) : FilesystemDirectoryDataEntity
166
    {
167 1
        $this->container['is_autoindex'] = $isAutoindex ? 1 : 0;
168
169 1
        return $this;
170
    }
171
172
    /**
173
     * @return bool
174
     */
175 1
    public function getIsAutoIndex() : bool
176
    {
177 1
        return !empty($this->container['is_autoindex']);
178
    }
179
180
    /**
181
     * @param string $path
182
     * @return FilesystemDirectoryDataEntity
183
     */
184 1
    public function setPath(string $path) : FilesystemDirectoryDataEntity
185
    {
186 1
        $this->container['path'] = $path;
187
188 1
        return $this;
189
    }
190
191
    /**
192
     * @return null|string
193
     */
194 1
    public function getPath() : ? string
195
    {
196 1
        return $this->container['path'];
197
    }
198
199
    /**
200
     * @param string $baseName
201
     * @return FilesystemDirectoryDataEntity
202
     */
203 1
    public function setBaseName(string $baseName) : FilesystemDirectoryDataEntity
204
    {
205 1
        $this->container['basename'] = $baseName;
206
207 1
        return $this;
208
    }
209
210
    /**
211
     * @return null|string
212
     */
213 1
    public function getBaseName() : ? string
214
    {
215 1
        return $this->container['basename'];
216
    }
217
218
    /**
219
     * @param string $uri
220
     * @return FilesystemDirectoryDataEntity
221
     */
222 1
    public function setUri(string $uri) : FilesystemDirectoryDataEntity
223
    {
224 1
        $this->container['uri'] = $uri;
225
226 1
        return $this;
227
    }
228
229
    /**
230
     * @return null|string
231
     */
232 1
    public function getUri() : ? string
233
    {
234 1
        return $this->container['uri'];
235
    }
236
237
    /**
238
     * @param string $type
239
     * @return FilesystemDirectoryDataEntity
240
     */
241 1
    public function setType(string $type) : FilesystemDirectoryDataEntity
242
    {
243 1
        $this->container['type'] = $type;
244
245 1
        return $this;
246
    }
247
248
    /**
249
     * @return null|string
250
     */
251 1
    public function getType() : ? string
252
    {
253 1
        return $this->container['type'];
254
    }
255
256
    /**
257
     * @param string $title
258
     * @return FilesystemDirectoryDataEntity
259
     */
260 1
    public function setTitle(string $title) : FilesystemDirectoryDataEntity
261
    {
262 1
        $this->container['title'] = $title;
263
264 1
        return $this;
265
    }
266
267
    /**
268
     * @return null|string
269
     */
270 1
    public function getTitle() : ? string
271
    {
272 1
        return $this->container['title'];
273
    }
274
}
275