1 | <?php |
||
23 | class GearmanWorkExecutedEvent extends Event |
||
24 | { |
||
25 | /** |
||
26 | * @var array |
||
27 | * |
||
28 | * Gearman jobs running |
||
29 | */ |
||
30 | protected $jobs; |
||
31 | |||
32 | /** |
||
33 | * @var int |
||
34 | * |
||
35 | * Remaining iterations on work |
||
36 | */ |
||
37 | protected $iterationsRemaining; |
||
38 | |||
39 | /** |
||
40 | * @var int |
||
41 | * |
||
42 | * Return code from last ran job |
||
43 | */ |
||
44 | protected $returnCode; |
||
45 | |||
46 | /** |
||
47 | * Construct method |
||
48 | * |
||
49 | * @param array $jobs Jobs |
||
50 | * @param int $iterationsRemaining Iterations Remaining |
||
51 | * @param int $returnCode Return code |
||
52 | */ |
||
53 | 1 | public function __construct(array $jobs, $iterationsRemaining, $returnCode) |
|
59 | |||
60 | /** |
||
61 | * Get Gearman Work subscribed jobs |
||
62 | * |
||
63 | * @return array Subscribed jobs |
||
64 | */ |
||
65 | public function getJobs() |
||
69 | |||
70 | /** |
||
71 | * Get Gearman Work remaining iteration length |
||
72 | * |
||
73 | * @return int Remaining iterations |
||
74 | */ |
||
75 | public function getIterationsRemaining() |
||
79 | |||
80 | /** |
||
81 | * Get Gearman Job return code |
||
82 | * |
||
83 | * @return int Last return code |
||
84 | */ |
||
85 | public function getReturnCode() |
||
89 | } |
||
90 |