1 | <?php |
||
28 | class OverwriteFileHandler |
||
29 | { |
||
30 | /** |
||
31 | * The filesystem. |
||
32 | * |
||
33 | * @var Filesystem |
||
34 | */ |
||
35 | private $filesystem; |
||
36 | |||
37 | /** |
||
38 | * The file repository. |
||
39 | * |
||
40 | * @var FileRepository |
||
41 | */ |
||
42 | private $repository; |
||
43 | |||
44 | /** |
||
45 | * Constructor. |
||
46 | * |
||
47 | * @param Filesystem $filesystem The filesystem |
||
48 | * @param FileRepository $aRepository The file repository |
||
49 | */ |
||
50 | public function __construct(Filesystem $filesystem, FileRepository $aRepository) |
||
55 | |||
56 | /** |
||
57 | * Handles the given command. |
||
58 | * |
||
59 | * @param OverwriteFileCommand $aCommand The command |
||
60 | * |
||
61 | * @throws FileDoesNotExistException when file does not exist |
||
62 | */ |
||
63 | public function __invoke(OverwriteFileCommand $aCommand) |
||
78 | } |
||
79 |