1 | <?php |
||
21 | abstract class Abstraction |
||
22 | { |
||
23 | /** |
||
24 | * Cleanup your backup directory. |
||
25 | * |
||
26 | * @see \phpbu\App\Backup\Cleanup::cleanup() |
||
27 | * @param \phpbu\App\Backup\Target $target |
||
28 | * @param \phpbu\App\Backup\Collector $collector |
||
29 | * @param \phpbu\App\Result $result |
||
30 | * @throws \phpbu\App\Backup\Cleaner\Exception |
||
31 | */ |
||
32 | public function cleanup(Target $target, Collector $collector, Result $result) |
||
42 | |||
43 | /** |
||
44 | * Simulate the cleanup execution. |
||
45 | * |
||
46 | * @param \phpbu\App\Backup\Target $target |
||
47 | * @param \phpbu\App\Backup\Collector $collector |
||
48 | * @param \phpbu\App\Result $result |
||
49 | */ |
||
50 | public function simulate(Target $target, Collector $collector, Result $result) |
||
56 | |||
57 | /** |
||
58 | * Return list of files to delete. |
||
59 | * |
||
60 | * @param \phpbu\App\Backup\Target $target |
||
61 | * @param \phpbu\App\Backup\Collector $collector |
||
62 | * @return \phpbu\App\Backup\File[] |
||
63 | * @throws \phpbu\App\Exception |
||
64 | */ |
||
65 | abstract protected function getFilesToDelete(Target $target, Collector $collector); |
||
66 | } |
||
67 |