| 1 | <?php |
||
| 18 | class PreWorkerEvent extends Event |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var WorkerInterface Worker |
||
| 22 | */ |
||
| 23 | protected $worker; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var mixed Object sent to worker |
||
| 27 | */ |
||
| 28 | protected $object; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param WorkerInterface $worker Worker |
||
| 32 | * @param mixed $object Object sent to worker |
||
| 33 | */ |
||
| 34 | 7 | public function __construct(WorkerInterface $worker, $object) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Returns worker. |
||
| 42 | * |
||
| 43 | * @return WorkerInterface Worker |
||
| 44 | */ |
||
| 45 | 1 | public function getWorker() |
|
| 49 | |||
| 50 | /** |
||
| 51 | * Returns object which is going to be passed through a worker. |
||
| 52 | * |
||
| 53 | * @return mixed Object sent to worker |
||
| 54 | */ |
||
| 55 | 3 | public function getObject() |
|
| 59 | } |
||
| 60 |