1 | <?php |
||
19 | class WriteEvent extends IoEvent |
||
20 | { |
||
21 | /** |
||
22 | * Operation to be used in I/O |
||
23 | * |
||
24 | * @var WriteOperation |
||
25 | */ |
||
26 | private $operation; |
||
27 | |||
28 | /** |
||
29 | * Constructor |
||
30 | * |
||
31 | * @param WriteOperation $operation Operation, which will be used in I/O |
||
32 | * @param RequestExecutorInterface $executor Request executor object |
||
33 | * @param SocketInterface $socket Socket for this request |
||
34 | * @param mixed $context Any optional user data for event |
||
35 | */ |
||
36 | 45 | public function __construct( |
|
37 | WriteOperation $operation, |
||
38 | RequestExecutorInterface $executor, |
||
39 | SocketInterface $socket, |
||
40 | $context |
||
41 | ) { |
||
42 | 45 | parent::__construct($executor, $socket, $context, EventType::WRITE); |
|
43 | 45 | $this->operation = $operation; |
|
44 | 45 | } |
|
45 | |||
46 | /** |
||
47 | * Return operation object |
||
48 | * |
||
49 | * @return WriteOperation |
||
50 | */ |
||
51 | 6 | public function getOperation() |
|
55 | } |
||
56 |