| 1 | <?php |
||
| 15 | class Job implements JobInterface |
||
| 16 | { |
||
| 17 | /** @var Rule */ |
||
| 18 | private $rRule; |
||
| 19 | |||
| 20 | /** @var callable */ |
||
| 21 | private $callable; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Job constructor. |
||
| 25 | * @param Rule $rRule - recurrence rules (@see https://github.com/simshaun/recurr) |
||
| 26 | * @param callable $callable |
||
| 27 | */ |
||
| 28 | 8 | public function __construct(Rule $rRule, callable $callable) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @return Rule |
||
| 36 | */ |
||
| 37 | 15 | public function getRRule() |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @return callable |
||
| 44 | */ |
||
| 45 | 2 | public function getCallable() |
|
| 49 | |||
| 50 | /** |
||
| 51 | * @param string $rRule RRULE string |
||
| 52 | * @param string|DateTimeInterface $startDate - @see DateTime supported formats |
||
| 53 | * @param callable $callback |
||
| 54 | * @param string|DateTimeZone $timezone - If $timezone is omitted, the current timezone will be used. |
||
| 55 | * @return Job |
||
| 56 | */ |
||
| 57 | 1 | public static function createFromString($rRule, $startDate, callable $callback, $timezone = null) |
|
| 68 | } |