1 | <?php |
||
7 | class WorkerEvent extends Event |
||
8 | { |
||
9 | const EVENT_BEFORE_RUN = 'worker.before_run'; |
||
10 | const EVENT_AFTER_RUN = 'worker.after_run'; |
||
11 | const EVENT_ON_IO_WAIT = 'worker.on_io_wait'; |
||
12 | const EVENT_ON_NO_JOBS = 'worker.on_no_jobs'; |
||
13 | const EVENT_ON_WORK = 'worker.on_work'; |
||
14 | const EVENT_ON_BEFORE_DESTROY = 'worker.on_before_destroy'; |
||
15 | |||
16 | /** |
||
17 | * @var Worker |
||
18 | */ |
||
19 | private $worker; |
||
20 | |||
21 | 8 | public function __construct(Worker $workerInstance) |
|
25 | |||
26 | /** |
||
27 | * @return Worker |
||
28 | */ |
||
29 | 2 | public function getWorkerInstance() |
|
33 | } |
||
34 |