1 | <?php |
||
11 | class Cursor implements \Iterator |
||
12 | { |
||
13 | /** |
||
14 | * @var ConnectionCursorInterface |
||
15 | */ |
||
16 | private $connection; |
||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | private $index; |
||
21 | /** |
||
22 | * @var bool |
||
23 | */ |
||
24 | private $isComplete; |
||
25 | /** |
||
26 | * @var MessageInterface |
||
27 | */ |
||
28 | private $message; |
||
29 | /** |
||
30 | * @var ResponseInterface |
||
31 | */ |
||
32 | private $response; |
||
33 | /** |
||
34 | * @var int |
||
35 | */ |
||
36 | private $size; |
||
37 | /** |
||
38 | * @var int |
||
39 | */ |
||
40 | private $token; |
||
41 | |||
42 | /** |
||
43 | * @param ConnectionCursorInterface $connection |
||
44 | * @param int $token |
||
45 | * @param ResponseInterface $response |
||
46 | * @param MessageInterface $message |
||
47 | */ |
||
48 | 3 | public function __construct( |
|
59 | |||
60 | /** |
||
61 | * @inheritdoc |
||
62 | * @throws \Exception |
||
63 | */ |
||
64 | 1 | public function current() |
|
78 | |||
79 | /** |
||
80 | * @inheritdoc |
||
81 | * @throws \Exception |
||
82 | */ |
||
83 | public function next(): void |
||
89 | |||
90 | /** |
||
91 | * @inheritdoc |
||
92 | */ |
||
93 | public function key(): int |
||
97 | |||
98 | /** |
||
99 | * @inheritdoc |
||
100 | */ |
||
101 | 1 | public function valid(): bool |
|
105 | |||
106 | /** |
||
107 | * @inheritdoc |
||
108 | * @throws ConnectionException |
||
109 | */ |
||
110 | public function rewind(): void |
||
116 | |||
117 | /** |
||
118 | * @param ResponseInterface $response |
||
119 | */ |
||
120 | 3 | private function addResponse(ResponseInterface $response) |
|
127 | |||
128 | /** |
||
129 | * @return void |
||
130 | * @throws \Exception |
||
131 | */ |
||
132 | 1 | private function seek(): void |
|
142 | |||
143 | /** |
||
144 | * @return void |
||
145 | * @throws \Exception |
||
146 | */ |
||
147 | private function request(): void |
||
159 | |||
160 | /** |
||
161 | * @return void |
||
162 | */ |
||
163 | private function close(): void |
||
174 | } |
||
175 |