1 | <?php declare(strict_types=1); |
||
9 | final class Action implements ActionInterface |
||
10 | { |
||
11 | /** @var string */ |
||
12 | private $key; |
||
13 | |||
14 | /** @var CronExpression */ |
||
15 | private $expression; |
||
16 | |||
17 | /** @var callable */ |
||
18 | private $performer; |
||
19 | |||
20 | /** |
||
21 | * @param string $key |
||
22 | * @param string $expression |
||
23 | * @param callable $performer |
||
24 | */ |
||
25 | 10 | public function __construct(string $key, string $expression, callable $performer) |
|
31 | |||
32 | 8 | public function getKey(): string |
|
36 | |||
37 | 9 | public function isDue(): bool |
|
41 | |||
42 | 9 | public function perform(): PromiseInterface |
|
48 | } |
||
49 |