IndexLineInterface.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPStaging\Backup\Interfaces; |
| 4 | |
| 5 | use WPStaging\Framework\Job\Exception\FileValidationException; |
| 6 | |
| 7 | /** |
| 8 | * Use in Backup Index Line |
| 9 | */ |
| 10 | interface IndexLineInterface |
| 11 | { |
| 12 | public function getContentStartOffset(): int; |
| 13 | |
| 14 | public function getStartOffset(): int; |
| 15 | |
| 16 | public function getIdentifiablePath(): string; |
| 17 | |
| 18 | public function getUncompressedSize(): int; |
| 19 | |
| 20 | public function getCompressedSize(): int; |
| 21 | |
| 22 | public function getIsCompressed(): bool; |
| 23 | |
| 24 | public function isIndexLine(string $indexLine): bool; |
| 25 | |
| 26 | public function readIndexLine(string $indexLine): IndexLineInterface; |
| 27 | |
| 28 | /** |
| 29 | * @param string $filePath |
| 30 | * @param string $pathForErrorLogging |
| 31 | * @return void |
| 32 | * |
| 33 | * @throws FileValidationException |
| 34 | */ |
| 35 | public function validateFile(string $filePath, string $pathForErrorLogging = ''); |
| 36 | } |
| 37 |