1 | <?php |
||
14 | class Job implements JobInterface |
||
15 | { |
||
16 | /** @var RRuleInterface */ |
||
17 | private $rRule; |
||
18 | |||
19 | /** @var callable */ |
||
20 | private $callable; |
||
21 | |||
22 | /** |
||
23 | * Job constructor. |
||
24 | * @param RRuleInterface $rRule - recurrence rule |
||
25 | * @param callable $callable |
||
26 | */ |
||
27 | 17 | public function __construct(RRuleInterface $rRule, callable $callable) |
|
32 | |||
33 | /** |
||
34 | * @return RRuleInterface |
||
35 | */ |
||
36 | 20 | public function getRRule() |
|
40 | |||
41 | /** |
||
42 | * @return callable |
||
43 | */ |
||
44 | 9 | public function getCallable() |
|
48 | |||
49 | /** |
||
50 | * @param string $rRule RRULE string |
||
51 | * @param string|DateTimeInterface $startDate - @see DateTime supported formats |
||
52 | * @param callable $callback |
||
53 | * @param string|DateTimeZone $timezone - If $timezone is omitted, the current timezone will be used. |
||
54 | * If $startDate is instance of `DateTimeInterface` then $timezone parameter will be ignored |
||
55 | * @return Job |
||
56 | */ |
||
57 | 1 | public static function createFromString($rRule, $startDate, callable $callback, $timezone = null) |
|
71 | |||
72 | /** |
||
73 | * @param $rRule |
||
74 | * @param DateTimeInterface $startDate |
||
75 | * @return RRuleInterface |
||
76 | */ |
||
77 | 1 | protected static function createRRule($rRule, DateTimeInterface $startDate) |
|
87 | } |