Job
1 day ago
Service
11 months ago
Task
11 months ago
DirectoryNodeDto.php
1 year ago
ListableStagingSite.php
1 year ago
StagingSiteDto.php
2 months ago
DirectoryNodeDto.php
128 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPStaging\Staging\Dto; |
| 4 | |
| 5 | /** |
| 6 | * Class DirectoryNodeDto |
| 7 | * |
| 8 | * This is OOP representation of directory scanned in setup step |
| 9 | * |
| 10 | * @package WPStaging\Staging\Dto |
| 11 | */ |
| 12 | class DirectoryNodeDto |
| 13 | { |
| 14 | /** |
| 15 | * @var string |
| 16 | */ |
| 17 | private $name = ''; |
| 18 | |
| 19 | /** |
| 20 | * @var string |
| 21 | */ |
| 22 | private $path = ''; |
| 23 | |
| 24 | /** |
| 25 | * @var float |
| 26 | */ |
| 27 | private $size = 0; |
| 28 | |
| 29 | /** |
| 30 | * @var bool |
| 31 | */ |
| 32 | private $isLink = false; |
| 33 | |
| 34 | /** |
| 35 | * @var string |
| 36 | */ |
| 37 | private $identifier = ''; |
| 38 | |
| 39 | /** |
| 40 | * @var string |
| 41 | */ |
| 42 | private $basePath = ''; |
| 43 | |
| 44 | public function getName(): string |
| 45 | { |
| 46 | return $this->name; |
| 47 | } |
| 48 | |
| 49 | public function getPath(): string |
| 50 | { |
| 51 | return $this->path; |
| 52 | } |
| 53 | |
| 54 | public function getSize(): float |
| 55 | { |
| 56 | return $this->size; |
| 57 | } |
| 58 | |
| 59 | public function isLink(): bool |
| 60 | { |
| 61 | return $this->isLink; |
| 62 | } |
| 63 | |
| 64 | public function getIdentifier(): string |
| 65 | { |
| 66 | return $this->identifier; |
| 67 | } |
| 68 | |
| 69 | public function getBasePath(): string |
| 70 | { |
| 71 | return $this->basePath; |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * @param string $name |
| 76 | * @return void |
| 77 | */ |
| 78 | public function setName(string $name) |
| 79 | { |
| 80 | $this->name = $name; |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * @param string $path |
| 85 | * @return void |
| 86 | */ |
| 87 | public function setPath(string $path) |
| 88 | { |
| 89 | $this->path = $path; |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * @param float $size |
| 94 | * @return void |
| 95 | */ |
| 96 | public function setSize(float $size) |
| 97 | { |
| 98 | $this->size = $size; |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * @param bool $isLink |
| 103 | * @return void |
| 104 | */ |
| 105 | public function setIsLink(bool $isLink) |
| 106 | { |
| 107 | $this->isLink = $isLink; |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * @param string $identifier |
| 112 | * @return void |
| 113 | */ |
| 114 | public function setIdentifier(string $identifier) |
| 115 | { |
| 116 | $this->identifier = $identifier; |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * @param string $basePath |
| 121 | * @return void |
| 122 | */ |
| 123 | public function setBasePath(string $basePath) |
| 124 | { |
| 125 | $this->basePath = $basePath; |
| 126 | } |
| 127 | } |
| 128 |