| 1 | <?php |
||
| 8 | class ProcessCallbackTask extends CallbackTask implements Expires, Process |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var null|int |
||
| 12 | */ |
||
| 13 | protected $id; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var null|int |
||
| 17 | */ |
||
| 18 | protected $startTime; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var null|int |
||
| 22 | */ |
||
| 23 | protected $expiredAt; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @inheritdoc |
||
| 27 | * |
||
| 28 | * @return null|int |
||
| 29 | */ |
||
| 30 | public function getId() |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @inheritdoc |
||
| 37 | * |
||
| 38 | * @param int $id |
||
| 39 | * |
||
| 40 | * @return $this |
||
| 41 | */ |
||
| 42 | public function setId($id) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @inheritdoc |
||
| 51 | * |
||
| 52 | * @return int |
||
| 53 | */ |
||
| 54 | public function getExpiresIn() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @inheritdoc |
||
| 61 | * |
||
| 62 | * @param int $startedAt |
||
| 63 | * |
||
| 64 | * @return bool |
||
| 65 | */ |
||
| 66 | public function shouldExpire($startedAt) |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Checks whether this task has expired. |
||
| 75 | * |
||
| 76 | * @return bool |
||
| 77 | */ |
||
| 78 | public function hasExpired() |
||
| 82 | } |
||
| 83 |