| 1 | <?php |
||
| 22 | final class LocalFile implements File |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * Path to the file. |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private $path; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * LocalFile constructor. |
||
| 32 | */ |
||
| 33 | 3 | public function __construct(string $path) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * Returns the content of the file as a string. |
||
| 40 | */ |
||
| 41 | 1 | public function getContents(): string |
|
| 45 | |||
| 46 | /** |
||
| 47 | * Returns md5 hash of the file. |
||
| 48 | */ |
||
| 49 | 1 | public function md5(): string |
|
| 53 | |||
| 54 | /** |
||
| 55 | * Returns an relative path to the file. |
||
| 56 | */ |
||
| 57 | 1 | public function path(): string |
|
| 61 | } |
||
| 62 |