PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backups, Restore, Migration & Clone / 4.7.0
WP STAGING – WordPress Backups, Restore, Migration & Clone v4.7.0
4.11.2 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 / Backup / Dto / Job / JobBackupDataDto.php
wp-staging / Backup / Dto / Job Last commit date
JobBackupDataDto.php 6 months ago JobRestoreDataDto.php 10 months ago
JobBackupDataDto.php
1091 lines
1 <?php
2
3 namespace WPStaging\Backup\Dto\Job;
4
5 use WPStaging\Backup\Dto\Interfaces\RemoteUploadDtoInterface;
6 use WPStaging\Backup\Dto\Traits\IsExportingTrait;
7 use WPStaging\Backup\Dto\Traits\IsExcludingTrait;
8 use WPStaging\Backup\Dto\Traits\RemoteUploadTrait;
9 use WPStaging\Backup\Entity\BackupMetadata;
10 use WPStaging\Framework\Facades\Hooks;
11 use WPStaging\Framework\Job\Dto\JobDataDto;
12
13 class JobBackupDataDto extends JobDataDto implements RemoteUploadDtoInterface
14 {
15 use IsExportingTrait;
16 use IsExcludingTrait;
17 use RemoteUploadTrait;
18
19 /** @var string|null */
20 private $name;
21
22 /** @var array */
23 private $excludedDirectories = [];
24
25 /** @var int */
26 private $totalDirectories;
27
28 /** @var int The number of files in the backup index */
29 private $totalFiles;
30
31 /** @var array The number of files in backup parts */
32 private $filesInParts = [];
33
34 /** @var int The number of files the FilesystemScanner discovered */
35 private $discoveredFiles = 0;
36
37 /** @var array The number of files the FilesystemScanner discovered in themes,plugins,muplugins,uploads,others */
38 private $discoveredFilesArray = [];
39
40 /** @var int The number of discovered files couldn't be added to backup */
41 private $invalidFiles = 0;
42
43 /** @var string */
44 private $databaseFile;
45
46 /**
47 * @var int If a file couldn't be processed in a single request,
48 * this property holds how many bytes were written thus far
49 * so that the backup can start writing from this byte onwards.
50 */
51 private $fileBeingBackupWrittenBytes;
52
53 /**
54 * @var int If header of a file was written but it couldn't be processed in single requests,
55 */
56 private $currentWrittenFileHeaderBytes = 0;
57
58 /**
59 * @var int start offset of the current file being processed,
60 */
61 private $currentFileStartOffset = 0;
62
63 /** @var int */
64 private $totalRowsBackup = 0;
65
66 /** @var int */
67 private $tableRowsOffset = 0;
68
69 /** @var int */
70 private $totalRowsOfTableBeingBackup = 0;
71
72 /** @var int reset to PHP_INT_MIN for each table */
73 private $lastInsertId = PHP_INT_MIN;
74
75 /** @var array */
76 private $tablesToBackup = [];
77
78 /** @var array */
79 private $nonWpTables = [];
80
81 /** @var int The size in bytes of the database in this backup */
82 private $databaseFileSize = 0;
83
84 /** @var int The size in bytes of the filesystem in this backup */
85 private $filesystemSize = 0;
86
87 /** @var int The number of requests that the Discovering Files task has executed so far */
88 private $discoveringFilesRequests = 0;
89
90 /** @var string The cron to repeat this backup, if scheduled. */
91 private $scheduleRecurrence = '';
92
93 /** @var array The hour and minute to repeat this backup, if scheduled. */
94 private $scheduleTime = [];
95
96 /** @var int How many backups to keep, if scheduled. */
97 private $scheduleRotation = 0;
98
99 /** @var string The absolute path to this .wpstg file */
100 private $backupFilePath = '';
101
102 /** @var string If set, this backup was created as part of this schedule ID. */
103 private $scheduleId = '';
104
105 /** @var bool Should the backup be validated for each file once the backup is created. */
106 private $isValidateBackupFiles = false;
107
108 /** @var bool Should this scheduled backup be created right now. Matters only if this backup is repeated on schedule */
109 private $isCreateScheduleBackupNow = false;
110
111 /** @var bool Should the backup be created in background? */
112 private $isCreateBackupInBackground = false;
113
114 /** @var array Site selected to backup */
115 private $sitesToBackup = [];
116
117 /**
118 * is network subsite or network main site backup
119 * @var bool */
120 private $isNetworkSiteBackup = false;
121
122 /**
123 * @var array
124 * Store max index for each category
125 */
126 private $fileBackupIndices = [];
127
128 /** @var int */
129 private $maxDbPartIndex = 0;
130
131 /** @var int */
132 private $currentMultipartFileInfoIndex = 0;
133
134 /** @var array */
135 private $multipartFilesInfo = [];
136
137 /**
138 * @var array<string, int>
139 * Store total size for each category
140 */
141 private $categorySizes = [];
142
143 /** @var string */
144 private $backupType = '';
145
146 /** @var int */
147 private $subsiteBlogId = 0;
148
149 /** @var int */
150 private $filePartIndex = 0;
151
152 /** @var bool */
153 private $isContaining2GBFile = false;
154
155 /** @var bool */
156 private $isGlitchInBackup = false;
157
158 /** @var string */
159 private $glitchReason = '';
160
161 /** @var int */
162 private $fileAppendTimeLimit = 10;
163
164 /** @var bool */
165 private $isCompressed = false;
166
167 /**
168 * @var int
169 */
170 private $backupSizeUncompressed = 0;
171
172 /**
173 * @var int
174 */
175 private $backupSizeCompressed = 0;
176
177 /**
178 * @var int
179 */
180 private $totalFilesCompressed = 0;
181
182 /**
183 * @return string|null
184 */
185 public function getName()
186 {
187 return $this->name;
188 }
189
190 /**
191 * Hydrated dynamically.
192 *
193 * @param string|null $name
194 */
195 public function setName($name)
196 {
197 $this->name = $name;
198 }
199
200 /**
201 * @return array|null
202 */
203 public function getExcludedDirectories()
204 {
205 return (array)$this->excludedDirectories;
206 }
207
208 public function setExcludedDirectories(array $excludedDirectories = [])
209 {
210 $this->excludedDirectories = $excludedDirectories;
211 }
212
213 /**
214 * @return int
215 */
216 public function getTotalDirectories()
217 {
218 return $this->totalDirectories;
219 }
220
221 /**
222 * @param int $totalDirectories
223 */
224 public function setTotalDirectories($totalDirectories)
225 {
226 $this->totalDirectories = $totalDirectories;
227 }
228
229 /**
230 * @return int
231 */
232 public function getTotalFiles()
233 {
234 return $this->totalFiles;
235 }
236
237 /**
238 * @param int $totalFiles
239 */
240 public function setTotalFiles($totalFiles)
241 {
242 $this->totalFiles = $totalFiles;
243 }
244
245 /**
246 * @return int
247 */
248 public function getDiscoveredFiles()
249 {
250 return $this->discoveredFiles;
251 }
252
253 /**
254 * @param int $discoveredFiles
255 */
256 public function setDiscoveredFiles($discoveredFiles)
257 {
258 $this->discoveredFiles = $discoveredFiles;
259 }
260
261 /**
262 * @return int
263 */
264 public function getInvalidFiles(): int
265 {
266 return $this->invalidFiles;
267 }
268
269 /**
270 * @param int $invalidFiles
271 * @return void
272 */
273 public function setInvalidFiles(int $invalidFiles)
274 {
275 $this->invalidFiles = $invalidFiles;
276 }
277
278 /**
279 * @return void
280 */
281 public function incrementInvalidFiles()
282 {
283 $this->invalidFiles++;
284 }
285
286 /**
287 * @return string
288 */
289 public function getDatabaseFile()
290 {
291 return $this->databaseFile;
292 }
293
294 /**
295 * @param string $databaseFile
296 */
297 public function setDatabaseFile($databaseFile)
298 {
299 $this->databaseFile = $databaseFile;
300 }
301
302 /**
303 * @return int
304 */
305 public function getTableRowsOffset()
306 {
307 return (int)$this->tableRowsOffset;
308 }
309
310 /**
311 * @param int $tableRowsOffset
312 */
313 public function setTableRowsOffset($tableRowsOffset)
314 {
315 $this->tableRowsOffset = (int)$tableRowsOffset;
316 }
317
318 /**
319 * @return int
320 */
321 public function getTotalRowsBackup()
322 {
323 return (int)$this->totalRowsBackup;
324 }
325
326 /**
327 * @param int $totalRowsBackup
328 */
329 public function setTotalRowsBackup($totalRowsBackup)
330 {
331 $this->totalRowsBackup = (int)$totalRowsBackup;
332 }
333
334 /**
335 * @return int
336 */
337 public function getFileBeingBackupWrittenBytes()
338 {
339 return (int)$this->fileBeingBackupWrittenBytes;
340 }
341
342 /**
343 * @param int $fileBeingBackupWrittenBytes
344 */
345 public function setFileBeingBackupWrittenBytes($fileBeingBackupWrittenBytes)
346 {
347 $this->fileBeingBackupWrittenBytes = (int)$fileBeingBackupWrittenBytes;
348 }
349
350 /**
351 * @return array
352 */
353 public function getTablesToBackup()
354 {
355 return (array)$this->tablesToBackup;
356 }
357
358 /**
359 * @param array $tablesToBackup
360 */
361 public function setTablesToBackup($tablesToBackup)
362 {
363 $this->tablesToBackup = (array)$tablesToBackup;
364 }
365
366 /**
367 * @return array
368 */
369 public function getNonWpTables()
370 {
371 return (array)$this->nonWpTables;
372 }
373
374 /**
375 * @param array $nonWpTables
376 */
377 public function setNonWpTables($nonWpTables)
378 {
379 $this->nonWpTables = (array)$nonWpTables;
380 }
381
382 /**
383 * @return int
384 */
385 public function getTotalRowsOfTableBeingBackup()
386 {
387 return (int)$this->totalRowsOfTableBeingBackup;
388 }
389
390 /**
391 * @param int $totalRowsOfTableBeingBackup
392 */
393 public function setTotalRowsOfTableBeingBackup($totalRowsOfTableBeingBackup)
394 {
395 $this->totalRowsOfTableBeingBackup = (int)$totalRowsOfTableBeingBackup;
396 }
397
398 /**
399 * @return int
400 */
401 public function getDatabaseFileSize()
402 {
403 return $this->databaseFileSize;
404 }
405
406 /**
407 * @param int $databaseFileSize
408 */
409 public function setDatabaseFileSize($databaseFileSize)
410 {
411 $this->databaseFileSize = $databaseFileSize;
412 }
413
414 /**
415 * @return int
416 */
417 public function getFilesystemSize()
418 {
419 return $this->filesystemSize;
420 }
421
422 /**
423 * @param int $filesystemSize
424 */
425 public function setFilesystemSize($filesystemSize)
426 {
427 $this->filesystemSize = $filesystemSize;
428 }
429
430 /**
431 * @return int
432 */
433 public function getDiscoveringFilesRequests()
434 {
435 return $this->discoveringFilesRequests;
436 }
437
438 /**
439 * @param int $discoveringFilesRequests
440 */
441 public function setDiscoveringFilesRequests($discoveringFilesRequests)
442 {
443 $this->discoveringFilesRequests = $discoveringFilesRequests;
444 }
445
446 /**
447 * @see Cron For WP STAGING cron recurrences.
448 *
449 * @return string A WP STAGING cron schedule
450 */
451 public function getScheduleRecurrence()
452 {
453 return $this->scheduleRecurrence;
454 }
455
456 /**
457 * @param string $scheduleRecurrence
458 */
459 public function setScheduleRecurrence($scheduleRecurrence)
460 {
461 $this->scheduleRecurrence = $scheduleRecurrence;
462 }
463
464 /**
465 * @return array H:i time format, expected to be accurate to the site's timezone, example: 00:00
466 */
467 public function getScheduleTime()
468 {
469 return $this->scheduleTime;
470 }
471
472 /**
473 * @param array $scheduleTime Hour and Minute ['00', '00']
474 */
475 public function setScheduleTime(array $scheduleTime)
476 {
477 $this->scheduleTime = $scheduleTime;
478 }
479
480 /**
481 * @return int How many backups to keep, example: 1
482 */
483 public function getScheduleRotation()
484 {
485 return $this->scheduleRotation;
486 }
487
488 /**
489 * @param int $scheduleRotation
490 */
491 public function setScheduleRotation($scheduleRotation)
492 {
493 $this->scheduleRotation = $scheduleRotation;
494 }
495
496 /**
497 * @return string
498 */
499 public function getBackupFilePath()
500 {
501 return $this->backupFilePath;
502 }
503
504 /**
505 * @param string $backupFilePath
506 */
507 public function setBackupFilePath($backupFilePath)
508 {
509 $this->backupFilePath = $backupFilePath;
510 }
511
512 /**
513 * @return string|null
514 */
515 public function getScheduleId()
516 {
517 return $this->scheduleId;
518 }
519
520 /**
521 * @param string $scheduleId
522 */
523 public function setScheduleId($scheduleId)
524 {
525 $this->scheduleId = $scheduleId;
526 }
527
528 /**
529 * @return bool
530 */
531 public function getIsCreateScheduleBackupNow()
532 {
533 return $this->isCreateScheduleBackupNow;
534 }
535
536 /**
537 * @param bool $isCreateScheduleBackupNow
538 */
539 public function setIsCreateScheduleBackupNow($isCreateScheduleBackupNow)
540 {
541 $this->isCreateScheduleBackupNow = (bool)$isCreateScheduleBackupNow;
542 }
543
544 /**
545 * @return bool
546 */
547 public function getIsCreateBackupInBackground(): bool
548 {
549 return (bool)$this->isCreateBackupInBackground;
550 }
551
552 /**
553 * Cannot strict type it yet, otherwise it might throw error for older scheduled backup
554 * @param bool $isCreateBackupInBackground
555 */
556 public function setIsCreateBackupInBackground($isCreateBackupInBackground)
557 {
558 $this->isCreateBackupInBackground = (bool)$isCreateBackupInBackground;
559 }
560
561 /**
562 * @return array|null
563 */
564 public function getSitesToBackup()
565 {
566 return (array)$this->sitesToBackup;
567 }
568
569 public function setSitesToBackup(array $sitesToBackup = [])
570 {
571 $this->sitesToBackup = $sitesToBackup;
572 }
573
574 /**
575 * @return array
576 */
577 public function getDiscoveredFilesArray()
578 {
579 return $this->discoveredFilesArray;
580 }
581
582 /**
583 * @param array $discoveredFiles
584 */
585 public function setDiscoveredFilesArray($discoveredFiles = [])
586 {
587 $this->discoveredFilesArray = $discoveredFiles;
588 }
589
590 /**
591 * @param string $category
592 * @return int
593 */
594 public function getDiscoveredFilesByCategory($category)
595 {
596 if (!array_key_exists($category, $this->discoveredFilesArray)) {
597 return 0;
598 }
599
600 return $this->discoveredFilesArray[$category];
601 }
602
603 /**
604 * @param string $category
605 * @param int $discoveredFiles
606 */
607 public function setDiscoveredFilesByCategory($category, $discoveredFiles)
608 {
609 $this->discoveredFilesArray[$category] = $discoveredFiles;
610 }
611
612 /**
613 * @return array
614 */
615 public function getFilesInParts()
616 {
617 return $this->filesInParts;
618 }
619
620 /**
621 * @param array $filesInParts
622 */
623 public function setFilesInParts($filesInParts = [])
624 {
625 $this->filesInParts = $filesInParts;
626 }
627
628 /**
629 * @param string $category
630 * @param int $categoryIndex
631 * @return int
632 */
633 public function getFilesInPart($category, $categoryIndex)
634 {
635 if (!array_key_exists($category, $this->filesInParts)) {
636 return 0;
637 }
638
639 if (!isset($this->filesInParts[$category][$categoryIndex])) {
640 return 0;
641 }
642
643 return $this->filesInParts[$category][$categoryIndex];
644 }
645
646 /**
647 * @param string $category
648 * @param int $categoryIndex
649 * @param int $files
650 */
651 public function setFilesInPart($category, $categoryIndex, $files)
652 {
653 if (!array_key_exists($category, $this->filesInParts)) {
654 $this->filesInParts[$category] = [];
655 }
656
657 $this->filesInParts[$category][$categoryIndex] = $files;
658 }
659
660 /**
661 * @param string $category
662 * @param int $categoryIndex
663 * @return void
664 */
665 public function incrementFilesInPart(string $category, int $categoryIndex = 0)
666 {
667 if (!array_key_exists($category, $this->filesInParts)) {
668 $this->filesInParts[$category] = [];
669 }
670
671 if (!array_key_exists($categoryIndex, $this->filesInParts[$category])) {
672 $this->filesInParts[$category][$categoryIndex] = 0;
673 }
674
675 $this->filesInParts[$category][$categoryIndex]++;
676 }
677
678 /**
679 * @return array
680 */
681 public function getFileBackupIndices()
682 {
683 return $this->fileBackupIndices;
684 }
685
686 /**
687 * @param array $fileBackupIndices
688 */
689 public function setFileBackupIndices($fileBackupIndices = [])
690 {
691 $this->fileBackupIndices = $fileBackupIndices;
692 }
693
694 /**
695 * @return int
696 */
697 public function getMaxDbPartIndex()
698 {
699 return $this->maxDbPartIndex;
700 }
701
702 /**
703 * @param int $maxDbPartIndex
704 */
705 public function setMaxDbPartIndex($maxDbPartIndex)
706 {
707 $this->maxDbPartIndex = $maxDbPartIndex;
708 }
709
710 /**
711 * @return int
712 */
713 public function getCurrentMultipartFileInfoIndex()
714 {
715 return $this->currentMultipartFileInfoIndex;
716 }
717
718 /**
719 * @param int $currentMultipartFileInfoIndex
720 */
721 public function setCurrentMultipartFileInfoIndex($currentMultipartFileInfoIndex)
722 {
723 $this->currentMultipartFileInfoIndex = $currentMultipartFileInfoIndex;
724 }
725
726 /**
727 * @return array
728 */
729 public function getMultipartFilesInfo()
730 {
731 return $this->multipartFilesInfo;
732 }
733
734 /**
735 * @param array $multipartFilesInfo
736 */
737 public function setMultipartFilesInfo($multipartFilesInfo)
738 {
739 $this->multipartFilesInfo = $multipartFilesInfo;
740 }
741
742 /**
743 * @param array $multipartFileInfo
744 */
745 public function addMultipartFileInfo($multipartFileInfo)
746 {
747 $this->multipartFilesInfo[] = $multipartFileInfo;
748 }
749
750 /**
751 * @param array $multipartFileInfo
752 * @param int $index
753 */
754 public function updateMultipartFileInfo($multipartFileInfo, $index)
755 {
756 $this->multipartFilesInfo[$index] = $multipartFileInfo;
757 }
758
759 /**
760 * @param int $lastInsertId
761 */
762 public function setLastInsertId($lastInsertId)
763 {
764 $this->lastInsertId = $lastInsertId;
765 }
766
767 /**
768 * @return int
769 */
770 public function getLastInsertId()
771 {
772 return $this->lastInsertId;
773 }
774
775 /**
776 * @param array<string, int> $categorySizes
777 */
778 public function setCategorySizes($categorySizes)
779 {
780 $this->categorySizes = $categorySizes;
781 }
782
783 /**
784 * @return array<string, int>
785 */
786 public function getCategorySizes()
787 {
788 return $this->categorySizes;
789 }
790
791 /**
792 * @return int
793 */
794 public function getFilePartIndex(): int
795 {
796 return $this->filePartIndex;
797 }
798
799 /**
800 * @param int $index
801 * @return void
802 */
803 public function setFilePartIndex(int $index = 0)
804 {
805 $this->filePartIndex = $index;
806 }
807
808 /**
809 * @param bool $isNetworkSiteBackup
810 * @return void
811 */
812 public function setIsNetworkSiteBackup(bool $isNetworkSiteBackup)
813 {
814 $this->isNetworkSiteBackup = $isNetworkSiteBackup;
815 }
816
817 /**
818 * @return bool
819 */
820 public function getIsNetworkSiteBackup(): bool
821 {
822 return (bool)$this->isNetworkSiteBackup;
823 }
824
825 /**
826 * @param string $backupType
827 * @return void
828 */
829 public function setBackupType(string $backupType)
830 {
831 $this->backupType = $backupType;
832 }
833
834 /**
835 * @return string
836 */
837 public function getBackupType(): string
838 {
839 return $this->backupType;
840 }
841
842 /**
843 * @param int|null $subsiteBlogId
844 * @return void
845 */
846 public function setSubsiteBlogId($subsiteBlogId)
847 {
848 $this->subsiteBlogId = $subsiteBlogId;
849 }
850
851 /**
852 * @return int
853 */
854 public function getSubsiteBlogId(): int
855 {
856 if (empty($this->subsiteBlogId)) {
857 $this->subsiteBlogId = get_current_blog_id();
858 }
859
860 return (int)$this->subsiteBlogId;
861 }
862
863 /**
864 * @return bool
865 */
866 public function getIsValidateBackupFiles(): bool
867 {
868 return (bool)$this->isValidateBackupFiles;
869 }
870
871 /**
872 * Cannot strict type it yet, otherwise it might throw error for older scheduled backup
873 * @param bool $isValidateBackupFiles
874 */
875 public function setIsValidateBackupFiles($isValidateBackupFiles)
876 {
877 $this->isValidateBackupFiles = (bool)$isValidateBackupFiles;
878 }
879
880 /**
881 * @return bool
882 */
883 public function getIsBackupFormatV1(): bool
884 {
885 return Hooks::applyFilters(BackupMetadata::FILTER_BACKUP_FORMAT_V1, false);
886 }
887
888 /**
889 * @return bool
890 */
891 public function getIsContaining2GBFile(): bool
892 {
893 return $this->isContaining2GBFile;
894 }
895
896 /**
897 * @param bool $isContaining2GBFile
898 * @return void
899 */
900 public function setIsContaining2GBFile(bool $isContaining2GBFile)
901 {
902 $this->isContaining2GBFile = $isContaining2GBFile;
903 }
904
905 public function getIsGlitchInBackup(): bool
906 {
907 return $this->isGlitchInBackup;
908 }
909
910 /**
911 * @param bool $isGlitchInBackup
912 * @return void
913 */
914 public function setIsGlitchInBackup(bool $isGlitchInBackup)
915 {
916 $this->isGlitchInBackup = $isGlitchInBackup;
917 }
918
919 public function getGlitchReason(): string
920 {
921 return $this->glitchReason;
922 }
923
924 /**
925 * @param string $glitchReason
926 * @return void
927 */
928 public function setGlitchReason(string $glitchReason)
929 {
930 $this->glitchReason = $glitchReason;
931 }
932
933 /**
934 * @return int
935 */
936 public function getCurrentWrittenFileHeaderBytes(): int
937 {
938 return (int)$this->currentWrittenFileHeaderBytes;
939 }
940
941 /**
942 * @param int $currentWrittenFileHeaderBytes
943 * @return void
944 */
945 public function setCurrentWrittenFileHeaderBytes(int $currentWrittenFileHeaderBytes)
946 {
947 $this->currentWrittenFileHeaderBytes = (int)$currentWrittenFileHeaderBytes;
948 }
949
950 public function getCurrentFileStartOffset(): int
951 {
952 return $this->currentFileStartOffset;
953 }
954
955 /**
956 * @param int $currentFileStartOffset
957 * @return void
958 */
959 public function setCurrentFileStartOffset(int $currentFileStartOffset)
960 {
961 $this->currentFileStartOffset = (int)$currentFileStartOffset;
962 }
963
964 /**
965 * @param int $timeLimit
966 * @return void
967 */
968 public function setFileAppendTimeLimit(int $timeLimit)
969 {
970 $this->fileAppendTimeLimit = $timeLimit;
971 }
972
973 /**
974 * @return int
975 */
976 public function getFileAppendTimeLimit(): int
977 {
978 return $this->fileAppendTimeLimit;
979 }
980
981 /**
982 * @return void
983 */
984 public function incrementFileAppendTimeLimit()
985 {
986 $this->fileAppendTimeLimit += 5;
987 }
988
989 /**
990 * @return void
991 */
992 public function resetFileAppendTimeLimit()
993 {
994 $this->fileAppendTimeLimit = 10;
995 }
996
997 /**
998 * @return bool
999 */
1000 public function getIsCompressed(): bool
1001 {
1002 return $this->isCompressed;
1003 }
1004
1005 /**
1006 * @param bool $isCompressed
1007 * @return void
1008 */
1009 public function setIsCompressed(bool $isCompressed)
1010 {
1011 $this->isCompressed = $isCompressed;
1012 }
1013
1014 /**
1015 * @return int
1016 */
1017 public function getBackupSizeUncompressed(): int
1018 {
1019 return $this->backupSizeUncompressed;
1020 }
1021
1022 /**
1023 * @param int $backupSizeUncompressed
1024 * @return void
1025 */
1026 public function setBackupSizeUncompressed(int $backupSizeUncompressed)
1027 {
1028 $this->backupSizeUncompressed = $backupSizeUncompressed;
1029 }
1030
1031 /**
1032 * @param int $backupSizeUncompressed
1033 * @return void
1034 */
1035 public function addBackupSizeUncompressed(int $backupSizeUncompressed)
1036 {
1037 $this->backupSizeUncompressed += $backupSizeUncompressed;
1038 }
1039
1040 /**
1041 * @return int
1042 */
1043 public function getBackupSizeCompressed(): int
1044 {
1045 return $this->backupSizeCompressed;
1046 }
1047
1048 /**
1049 * @param int $backupSizeCompressed
1050 * @return void
1051 */
1052 public function setBackupSizeCompressed(int $backupSizeCompressed)
1053 {
1054 $this->backupSizeCompressed = $backupSizeCompressed;
1055 }
1056
1057 /**
1058 * @param int $backupSizeCompressed
1059 * @return void
1060 */
1061 public function addBackupSizeCompressed(int $backupSizeCompressed)
1062 {
1063 $this->backupSizeCompressed += $backupSizeCompressed;
1064 }
1065
1066 /**
1067 * @return int
1068 */
1069 public function getTotalFilesCompressed(): int
1070 {
1071 return $this->totalFilesCompressed;
1072 }
1073
1074 /**
1075 * @param int $totalFilesCompressed
1076 * @return void
1077 */
1078 public function setTotalFilesCompressed(int $totalFilesCompressed)
1079 {
1080 $this->totalFilesCompressed = $totalFilesCompressed;
1081 }
1082
1083 /**
1084 * @return void
1085 */
1086 public function incrementTotalFilesCompressed()
1087 {
1088 $this->totalFilesCompressed++;
1089 }
1090 }
1091