1 | <?php |
||
21 | class Quantity extends Abstraction implements Cleaner |
||
22 | { |
||
23 | /** |
||
24 | * Amount of backups to keep |
||
25 | * |
||
26 | * @var integer |
||
27 | */ |
||
28 | protected $amount; |
||
29 | |||
30 | /** |
||
31 | * Setup the Cleaner. |
||
32 | * |
||
33 | * @see \phpbu\App\Backup\Cleanup::setup() |
||
34 | * @param array $options |
||
35 | * @throws \phpbu\App\Backup\Cleaner\Exception |
||
36 | */ |
||
37 | 14 | public function setup(array $options) |
|
50 | |||
51 | /** |
||
52 | * Return list of files to delete. |
||
53 | * |
||
54 | * @param \phpbu\App\Backup\Target $target |
||
55 | * @param \phpbu\App\Backup\Collector $collector |
||
56 | * @return \phpbu\App\Backup\File[] |
||
57 | */ |
||
58 | 11 | protected function getFilesToDelete(Target $target, Collector $collector) |
|
78 | |||
79 | /** |
||
80 | * Returns true when the capacity is exceeded. |
||
81 | * |
||
82 | * @param array $files |
||
83 | * @return bool |
||
84 | */ |
||
85 | 11 | private function isCapacityExceeded(array $files) |
|
89 | } |
||
90 |