| 1 | <?php |
||
| 12 | abstract class AbstractRule implements RRuleInterface |
||
| 13 | { |
||
| 14 | /** @var DateTimeInterface|string */ |
||
| 15 | protected $startDate; |
||
| 16 | |||
| 17 | /** @var string */ |
||
| 18 | protected $rRule; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Rule constructor. |
||
| 22 | * @param string $rRule |
||
| 23 | * @param string|DateTimeInterface $startDate |
||
| 24 | */ |
||
| 25 | public function __construct($rRule, DateTimeInterface $startDate) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return DateTimeInterface |
||
| 33 | */ |
||
| 34 | public function getStartDate() |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return string recurrence rule string |
||
| 41 | */ |
||
| 42 | public function getRrule() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param DateTimeInterface $from |
||
| 49 | * @param DateTimeInterface $to |
||
| 50 | * @param boolean $inc |
||
| 51 | * @return DateTimeInterface[] |
||
| 52 | */ |
||
| 53 | abstract public function getRecurrences(DateTimeInterface $from, DateTimeInterface $to, $inc = true); |
||
| 54 | } |