1 | <?php |
||
26 | class RenameFileHandler |
||
27 | { |
||
28 | /** |
||
29 | * The filesystem. |
||
30 | * |
||
31 | * @var Filesystem |
||
32 | */ |
||
33 | private $filesystem; |
||
34 | |||
35 | /** |
||
36 | * The file repository. |
||
37 | * |
||
38 | * @var FileRepository |
||
39 | */ |
||
40 | private $repository; |
||
41 | |||
42 | /** |
||
43 | * Constructor. |
||
44 | * |
||
45 | * @param Filesystem $filesystem The filesystem |
||
46 | * @param FileRepository $aRepository The file repository |
||
47 | */ |
||
48 | public function __construct(Filesystem $filesystem, FileRepository $aRepository) |
||
53 | |||
54 | /** |
||
55 | * Handles the given command. |
||
56 | * |
||
57 | * @param RenameFileCommand $aCommand The command |
||
58 | * |
||
59 | * @throws FileException when file does not exist |
||
60 | */ |
||
61 | public function __invoke(RenameFileCommand $aCommand) |
||
75 | } |
||
76 |