1 | <?php |
||
8 | class Operation |
||
9 | { |
||
10 | /** |
||
11 | * @var bool |
||
12 | */ |
||
13 | private $push; |
||
14 | |||
15 | /** |
||
16 | * @var int |
||
17 | */ |
||
18 | private $opCode; |
||
19 | |||
20 | /** |
||
21 | * @var BufferInterface |
||
22 | */ |
||
23 | private $pushData; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | private $pushDataSize; |
||
29 | |||
30 | /** |
||
31 | * Operation constructor. |
||
32 | * @param int $opCode |
||
33 | * @param BufferInterface $pushData |
||
34 | * @param int $pushDataSize |
||
35 | */ |
||
36 | 2594 | public function __construct($opCode, BufferInterface $pushData, $pushDataSize = 0) |
|
43 | |||
44 | /** |
||
45 | * @return bool |
||
46 | */ |
||
47 | 2556 | public function isPush() |
|
51 | |||
52 | /** |
||
53 | * @return int |
||
54 | */ |
||
55 | 2574 | public function getOp() |
|
59 | |||
60 | /** |
||
61 | * @return BufferInterface |
||
62 | */ |
||
63 | 2560 | public function getData() |
|
67 | |||
68 | /** |
||
69 | * @return int |
||
70 | */ |
||
71 | 1932 | public function getDataSize() |
|
79 | |||
80 | /** |
||
81 | * @return BufferInterface|int |
||
82 | */ |
||
83 | 2 | public function encode() |
|
91 | } |
||
92 |