| 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 | 4 | public function __construct(string $path) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Returns the content of the file as a string. |
||
| 44 | */ |
||
| 45 | 1 | public function getContents(): string |
|
| 49 | |||
| 50 | /** |
||
| 51 | * Returns md5 hash of the file. |
||
| 52 | */ |
||
| 53 | 1 | public function md5(): string |
|
| 57 | |||
| 58 | /** |
||
| 59 | * Returns an relative path to the file. |
||
| 60 | */ |
||
| 61 | 1 | public function path(): string |
|
| 65 | } |
||
| 66 |