Test Failed
Branch lab/data (a414ec)
by Gabor
07:41
created

FilesystemDirectoryDataEntity::getUri()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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