PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backups, Restore, Migration & Clone / 4.11.0
WP STAGING – WordPress Backups, Restore, Migration & Clone v4.11.0
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 / Staging / Dto / Task / FileCopierTaskDto.php
wp-staging / Staging / Dto / Task Last commit date
Response 1 day ago FileCopierTaskDto.php 1 day ago
FileCopierTaskDto.php
66 lines
1 <?php
2
3 namespace WPStaging\Staging\Dto\Task;
4
5 use WPStaging\Framework\Job\Dto\AbstractTaskDto;
6 use WPStaging\Staging\Dto\Service\BigFileDto;
7
8 class FileCopierTaskDto extends AbstractTaskDto
9 {
10
11 public $filePath = '';
12
13
14 public $destinationPath = '';
15
16
17 public $indexPath = '';
18
19
20 public $writtenBytesTotal = 0;
21
22
23 public $fileSize = 0;
24
25 public function getBigFileDto(): BigFileDto
26 {
27 $bigFileDto = new BigFileDto();
28 $bigFileDto->setFilePath($this->filePath);
29 $bigFileDto->setDestinationPath($this->destinationPath);
30 $bigFileDto->setIndexPath($this->indexPath);
31 $bigFileDto->setWrittenBytesTotal($this->writtenBytesTotal);
32 $bigFileDto->setFileSize($this->fileSize);
33
34 return $bigFileDto;
35 }
36
37
38
39
40
41
42
43 public function setBigFileDto($bigFileDto)
44 {
45 if ($bigFileDto === null) {
46 $this->reset();
47 return;
48 }
49
50 $this->filePath = $bigFileDto->getFilePath();
51 $this->destinationPath = $bigFileDto->getDestinationPath();
52 $this->indexPath = $bigFileDto->getIndexPath();
53 $this->writtenBytesTotal = $bigFileDto->getWrittenBytesTotal();
54 $this->fileSize = $bigFileDto->getFileSize();
55 }
56
57 public function reset()
58 {
59 $this->filePath = '';
60 $this->destinationPath = '';
61 $this->indexPath = '';
62 $this->writtenBytesTotal = 0;
63 $this->fileSize = 0;
64 }
65 }
66