| 1 | <?php |
||
| 20 | class Task extends BaseTask |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | private $intervalExpression; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | private $systemKey; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return mixed |
||
| 34 | */ |
||
| 35 | public function getIntervalExpression() |
||
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritdoc} |
||
| 42 | */ |
||
| 43 | 8 | public function getInterval() |
|
| 44 | { |
||
| 45 | 8 | if (null === $this->interval && null !== $this->intervalExpression) { |
|
| 46 | 2 | $this->interval = CronExpression::factory($this->intervalExpression); |
|
| 47 | } |
||
| 48 | |||
| 49 | 8 | return parent::getInterval(); |
|
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * {@inheritdoc} |
||
| 54 | */ |
||
| 55 | 5 | public function setInterval(CronExpression $interval, \DateTime $firstExecution = null, \DateTime $lastExecution = null) |
|
| 61 | |||
| 62 | /** |
||
| 63 | * Returns system-key. |
||
| 64 | * |
||
| 65 | * @return string |
||
| 66 | */ |
||
| 67 | 1 | public function getSystemKey() |
|
| 71 | |||
| 72 | /** |
||
| 73 | * Set system-key. |
||
| 74 | * |
||
| 75 | * @param string $systemKey |
||
| 76 | * |
||
| 77 | * @return $this |
||
| 78 | */ |
||
| 79 | 3 | public function setSystemKey($systemKey) |
|
| 85 | } |
||
| 86 |