1 | <?php |
||
10 | class FileSystemHandler implements FileSystemHandlerInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var FileSystemPathInterface |
||
14 | */ |
||
15 | private $path; |
||
16 | |||
17 | /** |
||
18 | * @var FileSystemReaderInterface |
||
19 | */ |
||
20 | private $fileReader; |
||
21 | |||
22 | /** |
||
23 | * @var FileSystemWriterInterface |
||
24 | */ |
||
25 | private $fileWriter; |
||
26 | |||
27 | /** |
||
28 | * FileSystemHandler constructor. |
||
29 | * @param string $path |
||
30 | */ |
||
31 | 1 | public function __construct(string $path) |
|
37 | |||
38 | /** |
||
39 | * @return FileSystemPath |
||
40 | */ |
||
41 | 1 | public function getPath(): FileSystemPathInterface |
|
45 | |||
46 | /** |
||
47 | * @inheritDoc |
||
48 | */ |
||
49 | 2 | public function readable(): bool |
|
53 | |||
54 | /** |
||
55 | * @inheritDoc |
||
56 | */ |
||
57 | 2 | public function writable(): bool |
|
61 | |||
62 | /** |
||
63 | * @inheritDoc |
||
64 | */ |
||
65 | 2 | public function read(): string |
|
69 | |||
70 | /** |
||
71 | * @inheritDoc |
||
72 | */ |
||
73 | 2 | public function write(string $content) |
|
77 | } |
||
78 |