PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backups, Restore, Migration & Clone / 4.11.0
WP STAGING – WordPress Backups, Restore, Migration & Clone v4.11.0
4.11.1 4.11.0 4.10.0 4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.1 trunk 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.10.0 3.2.0 3.3.1 3.3.2 3.3.3 3.4.1 3.4.3 3.5.0 3.6.0 3.7.1 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.7.2 4.7.3 4.8.0
wp-staging / Framework / Filesystem / FilesystemScannerDto.php
wp-staging / Framework / Filesystem Last commit date
Filters 3 days ago Scanning 3 days ago AbstractFileObject.php 3 days ago AbstractFilesystemScanner.php 3 days ago DebugLogReader.php 3 days ago DirectoryListing.php 3 days ago DirectorySize.php 3 days ago DiskWriteCheck.php 3 days ago FileObject.php 3 days ago Filesystem.php 3 days ago FilesystemExceptions.php 5 years ago FilesystemScanner.php 3 days ago FilesystemScannerDto.php 3 days ago FilterableDirectoryIterator.php 3 days ago LegacyFileRulesTrait.php 3 days ago LogCleanup.php 3 days ago LogFiles.php 3 days ago MissingFileException.php 3 years ago OPcache.php 3 days ago PartIdentifier.php 3 days ago PathChecker.php 3 days ago PathIdentifier.php 3 days ago Permissions.php 3 days ago WpUploadsFolderSymlinker.php 3 days ago
FilesystemScannerDto.php
201 lines
1 <?php
2
3 namespace WPStaging\Framework\Filesystem;
4
5 class FilesystemScannerDto
6 {
7
8 private $totalDirectories = 0;
9
10
11 private $filesystemSize = 0;
12
13
14 private $discoveredFiles = 0;
15
16
17 private $discoveredFilesArray = [];
18
19
20 private $isExcludingLogs = false;
21
22
23 private $isExcludingCaches = false;
24
25
26 private $excludedDirectories = [];
27
28
29 private $filesExcludedInRequest = [];
30
31
32
33
34
35 public function setTotalDirectories(int $totalDirectories)
36 {
37 $this->totalDirectories = $totalDirectories;
38 }
39
40
41
42
43
44 public function setFilesystemSize(int $filesystemSize)
45 {
46 $this->filesystemSize = $filesystemSize;
47 }
48
49
50
51
52
53 public function setDiscoveredFiles(int $discoveredFiles)
54 {
55 $this->discoveredFiles = $discoveredFiles;
56 }
57
58
59
60
61
62 public function setDiscoveredFilesArray(array $discoveredFilesArray)
63 {
64 $this->discoveredFilesArray = $discoveredFilesArray;
65 }
66
67
68
69
70
71 public function setIsExcludingLogs(bool $isExcludingLogs)
72 {
73 $this->isExcludingLogs = $isExcludingLogs;
74 }
75
76
77
78
79
80 public function setIsExcludingCaches(bool $isExcludingCaches)
81 {
82 $this->isExcludingCaches = $isExcludingCaches;
83 }
84
85
86
87
88
89 public function setExcludedDirectories(array $excludedDirectories)
90 {
91 $this->excludedDirectories = $excludedDirectories;
92 }
93
94 public function getTotalDirectories(): int
95 {
96 return $this->totalDirectories;
97 }
98
99 public function getFilesystemSize(): int
100 {
101 return $this->filesystemSize;
102 }
103
104 public function getDiscoveredFiles(): int
105 {
106 return $this->discoveredFiles;
107 }
108
109 public function getDiscoveredFilesArray(): array
110 {
111 return $this->discoveredFilesArray;
112 }
113
114 public function getIsExcludingLogs(): bool
115 {
116 return $this->isExcludingLogs;
117 }
118
119 public function getIsExcludingCaches(): bool
120 {
121 return $this->isExcludingCaches;
122 }
123
124 public function getExcludedDirectories(): array
125 {
126 return $this->excludedDirectories;
127 }
128
129
130
131
132
133
134 public function setDiscoveredFilesByCategory(string $category, int $count)
135 {
136 $this->discoveredFilesArray[$category] = $count;
137 }
138
139 public function getDiscoveredFilesByCategory(string $category): int
140 {
141 return $this->discoveredFilesArray[$category] ?? 0;
142 }
143
144
145
146
147 public function incrementDiscoveredFiles()
148 {
149 $this->discoveredFiles++;
150 }
151
152
153
154
155 public function incrementTotalDirectories()
156 {
157 $this->totalDirectories++;
158 }
159
160
161
162
163
164 public function incrementDiscoveredFilesByCategory(string $category)
165 {
166 $this->discoveredFilesArray[$category] = ($this->discoveredFilesArray[$category] ?? 0) + 1;
167 }
168
169
170
171
172
173 public function addFilesystemSize(int $size)
174 {
175 $this->filesystemSize += $size;
176 }
177
178 public function getFilesExcludedInRequest(): array
179 {
180 return $this->filesExcludedInRequest;
181 }
182
183
184
185
186
187 public function setFilesExcludedInRequest(array $filesExcludedInRequest)
188 {
189 $this->filesExcludedInRequest = $filesExcludedInRequest;
190 }
191
192
193
194
195
196 public function addFileExcludedInRequest(string $filePath)
197 {
198 $this->filesExcludedInRequest[] = $filePath;
199 }
200 }
201