|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* WebHemi. |
|
4
|
|
|
* |
|
5
|
|
|
* PHP version 7.1 |
|
6
|
|
|
* |
|
7
|
|
|
* @copyright 2012 - 2017 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\Filesystem; |
|
15
|
|
|
|
|
16
|
|
|
use WebHemi\Data\EntityInterface; |
|
17
|
|
|
use WebHemi\DateTime; |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* Class FilesystemDirectoryEntity. |
|
21
|
|
|
*/ |
|
22
|
|
|
class FilesystemDirectoryEntity implements EntityInterface |
|
23
|
|
|
{ |
|
24
|
|
|
/** @var int */ |
|
25
|
|
|
private $filesystemDirectoryId; |
|
26
|
|
|
/** @var string */ |
|
27
|
|
|
private $description; |
|
28
|
|
|
/** @var string */ |
|
29
|
|
|
private $directoryType; |
|
30
|
|
|
/** @var string */ |
|
31
|
|
|
private $proxy; |
|
32
|
|
|
/** @var bool */ |
|
33
|
|
|
private $isAutoIndex; |
|
34
|
|
|
/** @var DateTime */ |
|
35
|
|
|
private $dateCreated; |
|
36
|
|
|
/** @var DateTime */ |
|
37
|
|
|
private $dateModified; |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* Sets the value of the entity identifier. |
|
41
|
|
|
* |
|
42
|
|
|
* @param int $entityId |
|
43
|
|
|
* @return FilesystemDirectoryEntity |
|
44
|
|
|
*/ |
|
45
|
|
|
public function setKeyData(int $entityId) : FilesystemDirectoryEntity |
|
46
|
|
|
{ |
|
47
|
|
|
$this->filesystemDirectoryId = $entityId; |
|
48
|
|
|
|
|
49
|
|
|
return $this; |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* Gets the value of the entity identifier. |
|
54
|
|
|
* |
|
55
|
|
|
* @return null|int |
|
56
|
|
|
*/ |
|
57
|
|
|
public function getKeyData() : ? int |
|
58
|
|
|
{ |
|
59
|
|
|
return $this->filesystemDirectoryId; |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* @param int $filesystemDirectoryId |
|
64
|
|
|
* @return FilesystemDirectoryEntity |
|
65
|
|
|
*/ |
|
66
|
|
|
public function setFilesystemDirectoryId(int $filesystemDirectoryId) : FilesystemDirectoryEntity |
|
67
|
|
|
{ |
|
68
|
|
|
$this->filesystemDirectoryId = $filesystemDirectoryId; |
|
69
|
|
|
|
|
70
|
|
|
return $this; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* @return null|int |
|
75
|
|
|
*/ |
|
76
|
|
|
public function getFilesystemDirectoryId() : ? int |
|
77
|
|
|
{ |
|
78
|
|
|
return $this->filesystemDirectoryId; |
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
/** |
|
82
|
|
|
* @param string $description |
|
83
|
|
|
* @return FilesystemDirectoryEntity |
|
84
|
|
|
*/ |
|
85
|
|
|
public function setDescription(string $description) : FilesystemDirectoryEntity |
|
86
|
|
|
{ |
|
87
|
|
|
$this->description = $description; |
|
88
|
|
|
|
|
89
|
|
|
return $this; |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* @return null|string |
|
94
|
|
|
*/ |
|
95
|
|
|
public function getDescription() : ? string |
|
96
|
|
|
{ |
|
97
|
|
|
return $this->description; |
|
98
|
|
|
} |
|
99
|
|
|
|
|
100
|
|
|
/** |
|
101
|
|
|
* @param string $directoryType |
|
102
|
|
|
* @return FilesystemDirectoryEntity |
|
103
|
|
|
*/ |
|
104
|
|
|
public function setDirectoryType(string $directoryType) : FilesystemDirectoryEntity |
|
105
|
|
|
{ |
|
106
|
|
|
$this->directoryType = $directoryType; |
|
107
|
|
|
|
|
108
|
|
|
return $this; |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
/** |
|
112
|
|
|
* @return null|string |
|
113
|
|
|
*/ |
|
114
|
|
|
public function getDirectoryType() : ? string |
|
115
|
|
|
{ |
|
116
|
|
|
return $this->directoryType; |
|
117
|
|
|
} |
|
118
|
|
|
|
|
119
|
|
|
/** |
|
120
|
|
|
* @param string $proxy |
|
121
|
|
|
* @return FilesystemDirectoryEntity |
|
122
|
|
|
*/ |
|
123
|
|
|
public function setProxy(? string $proxy) : FilesystemDirectoryEntity |
|
124
|
|
|
{ |
|
125
|
|
|
$this->proxy = $proxy; |
|
126
|
|
|
|
|
127
|
|
|
return $this; |
|
128
|
|
|
} |
|
129
|
|
|
|
|
130
|
|
|
/** |
|
131
|
|
|
* @return null|string |
|
132
|
|
|
*/ |
|
133
|
|
|
public function getProxy() : ? string |
|
134
|
|
|
{ |
|
135
|
|
|
return $this->proxy; |
|
136
|
|
|
} |
|
137
|
|
|
|
|
138
|
|
|
/** |
|
139
|
|
|
* @param bool $state |
|
140
|
|
|
* @return FilesystemDirectoryEntity |
|
141
|
|
|
*/ |
|
142
|
|
|
public function setAutoIndex(bool $state) : FilesystemDirectoryEntity |
|
143
|
|
|
{ |
|
144
|
|
|
$this->isAutoIndex = $state; |
|
145
|
|
|
|
|
146
|
|
|
return $this; |
|
147
|
|
|
} |
|
148
|
|
|
|
|
149
|
|
|
/** |
|
150
|
|
|
* @return bool |
|
151
|
|
|
*/ |
|
152
|
|
|
public function getAutoIndex() : bool |
|
153
|
|
|
{ |
|
154
|
|
|
return $this->isAutoIndex ?? false; |
|
155
|
|
|
} |
|
156
|
|
|
|
|
157
|
|
|
/** |
|
158
|
|
|
* @param DateTime $dateCreated |
|
159
|
|
|
* @return FilesystemDirectoryEntity |
|
160
|
|
|
*/ |
|
161
|
|
|
public function setDateCreated(DateTime $dateCreated) : FilesystemDirectoryEntity |
|
162
|
|
|
{ |
|
163
|
|
|
$this->dateCreated = $dateCreated; |
|
164
|
|
|
|
|
165
|
|
|
return $this; |
|
166
|
|
|
} |
|
167
|
|
|
|
|
168
|
|
|
/** |
|
169
|
|
|
* @return null|DateTime |
|
170
|
|
|
*/ |
|
171
|
|
|
public function getDateCreated() : ? DateTime |
|
172
|
|
|
{ |
|
173
|
|
|
return $this->dateCreated; |
|
174
|
|
|
} |
|
175
|
|
|
|
|
176
|
|
|
/** |
|
177
|
|
|
* @param DateTime $dateModified |
|
178
|
|
|
* @return FilesystemDirectoryEntity |
|
179
|
|
|
*/ |
|
180
|
|
|
public function setDateModified(DateTime $dateModified) : FilesystemDirectoryEntity |
|
181
|
|
|
{ |
|
182
|
|
|
$this->dateModified = $dateModified; |
|
183
|
|
|
|
|
184
|
|
|
return $this; |
|
185
|
|
|
} |
|
186
|
|
|
|
|
187
|
|
|
/** |
|
188
|
|
|
* @return null|DateTime |
|
189
|
|
|
*/ |
|
190
|
|
|
public function getDateModified() : ? DateTime |
|
191
|
|
|
{ |
|
192
|
|
|
return $this->dateModified; |
|
193
|
|
|
} |
|
194
|
|
|
} |
|
195
|
|
|
|