1 | <?php |
||
15 | class RepetitiveDateEstimator |
||
16 | { |
||
17 | /** |
||
18 | * @var DateTime |
||
19 | */ |
||
20 | private $referenceDate; |
||
21 | |||
22 | /** |
||
23 | * @var RepetitiveInterval |
||
24 | */ |
||
25 | private $interval; |
||
26 | |||
27 | |||
28 | |||
29 | /** |
||
30 | * @param DateTime $referenceDate |
||
31 | * @param RepetitiveInterval $interval |
||
32 | */ |
||
33 | private function __construct(DateTime $referenceDate, RepetitiveInterval $interval) |
||
38 | |||
39 | |||
40 | |||
41 | /** |
||
42 | * @param DateTime $referenceDate |
||
43 | * @param RepetitiveInterval $interval |
||
44 | * |
||
45 | * @return RepetitiveDateEstimator |
||
46 | */ |
||
47 | public static function build(DateTime $referenceDate, RepetitiveInterval $interval) |
||
53 | |||
54 | |||
55 | |||
56 | /** |
||
57 | * @return DateTime |
||
58 | */ |
||
59 | public function getNextDate() |
||
84 | } |