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