1 | <?php |
||
10 | class FileSystemWriter implements FileSystemWriterInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var FileSystemPathInterface |
||
14 | */ |
||
15 | private $path; |
||
16 | |||
17 | /** |
||
18 | * FileSystemWriter constructor. |
||
19 | * @param FileSystemPathInterface $path |
||
20 | */ |
||
21 | 2 | public function __construct(FileSystemPathInterface $path) |
|
25 | |||
26 | /** |
||
27 | * @inheritDoc |
||
28 | */ |
||
29 | 1 | public function isWritable(): bool |
|
33 | |||
34 | /** |
||
35 | * @inheritDoc |
||
36 | */ |
||
37 | 1 | public function write(string $content) |
|
42 | |||
43 | /** |
||
44 | * @return bool |
||
45 | */ |
||
46 | 1 | private function isWritablePath() |
|
50 | |||
51 | /** |
||
52 | * @throws FileSystemException |
||
53 | * @throws InvalidPathException |
||
54 | */ |
||
55 | 4 | private function validate() |
|
69 | |||
70 | |||
71 | } |
||
72 |