1 | <?php |
||
10 | class Job |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @var AbstractEvent |
||
15 | */ |
||
16 | public $event; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | public $jobId; |
||
22 | |||
23 | /** |
||
24 | * @var integer |
||
25 | */ |
||
26 | public $timestamp; |
||
27 | |||
28 | /** |
||
29 | * @var int |
||
30 | */ |
||
31 | public $errorCounter = 0; |
||
32 | |||
33 | /** |
||
34 | * @param AbstractEvent $event |
||
35 | * @param string $jobId |
||
36 | * @param integer $timestamp |
||
37 | */ |
||
38 | 8 | public function __construct(AbstractEvent $event, string $jobId, int $timestamp) |
|
44 | |||
45 | /** |
||
46 | * @return string |
||
47 | */ |
||
48 | 3 | public function getJobId() : string |
|
52 | |||
53 | /** |
||
54 | * @return int |
||
55 | */ |
||
56 | 1 | public function getTimestamp() : int |
|
57 | { |
||
58 | 1 | return $this->timestamp; |
|
59 | } |
||
60 | |||
61 | /** |
||
62 | * @return AbstractEvent |
||
63 | */ |
||
64 | 3 | public function getEvent() : AbstractEvent |
|
68 | |||
69 | /** |
||
70 | * @param int $timestamp |
||
71 | */ |
||
72 | 1 | public function setTimestamp(int $timestamp) |
|
76 | } |
||
77 |