1 | <?php |
||
17 | class Range |
||
18 | { |
||
19 | /** |
||
20 | * Start timestamp. |
||
21 | * |
||
22 | * @var int |
||
23 | */ |
||
24 | private $start; |
||
25 | |||
26 | /** |
||
27 | * End timestamp. |
||
28 | * |
||
29 | * @var int |
||
30 | */ |
||
31 | private $end; |
||
32 | |||
33 | /** |
||
34 | * Keeper decides if file should be deleted. |
||
35 | * |
||
36 | * @var \phpbu\App\Backup\Cleaner\Stepwise\Keeper |
||
37 | */ |
||
38 | private $keeper; |
||
39 | |||
40 | /** |
||
41 | * Range constructor. |
||
42 | * |
||
43 | * @param int $start |
||
44 | * @param int $end |
||
45 | * @param \phpbu\App\Backup\Cleaner\Stepwise\Keeper $keeper |
||
46 | */ |
||
47 | public function __construct(int $start, int $end, Keeper $keeper) |
||
53 | |||
54 | /** |
||
55 | * Start timestamp getter. |
||
56 | * |
||
57 | * @return int |
||
58 | */ |
||
59 | public function getStart() : int |
||
63 | |||
64 | /** |
||
65 | * End timestamp getter. |
||
66 | * |
||
67 | * @return int |
||
68 | */ |
||
69 | public function getEnd() : int |
||
73 | |||
74 | /** |
||
75 | * Should this file be deleted. |
||
76 | * |
||
77 | * @param \phpbu\App\Backup\File $file |
||
78 | * @return bool |
||
79 | */ |
||
80 | public function keep(File $file) : bool |
||
84 | } |
||
85 |