1 | <?php |
||
6 | class SearchResults implements \Iterator |
||
7 | { |
||
8 | /** |
||
9 | * @var bool |
||
10 | */ |
||
11 | protected $hasTimedOut; |
||
12 | |||
13 | /** |
||
14 | * @var int |
||
15 | */ |
||
16 | protected $maxScore; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | protected $totalCount; |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | protected $totalTime; |
||
27 | |||
28 | /** |
||
29 | * @var Hit[] |
||
30 | */ |
||
31 | protected $hits = []; |
||
32 | |||
33 | /** |
||
34 | * @var int |
||
35 | */ |
||
36 | protected $_index = 0; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $aggregations = []; |
||
42 | |||
43 | /** |
||
44 | * @param array $data |
||
45 | */ |
||
46 | public function __construct(array $data) |
||
58 | |||
59 | /** |
||
60 | * @param array $hitsData |
||
61 | */ |
||
62 | protected function buildHits(array $hitsData) |
||
71 | |||
72 | /** |
||
73 | * @return boolean |
||
74 | */ |
||
75 | public function hasTimedOut() |
||
79 | |||
80 | /** |
||
81 | * @return int |
||
82 | */ |
||
83 | public function getMaxScore() |
||
87 | |||
88 | /** |
||
89 | * @return int |
||
90 | */ |
||
91 | public function getTotalCount() |
||
95 | |||
96 | /** |
||
97 | * @return int |
||
98 | */ |
||
99 | public function getTotalTime() |
||
103 | |||
104 | /** |
||
105 | * @return Hit[] |
||
106 | */ |
||
107 | public function getHits() |
||
111 | |||
112 | /** |
||
113 | * @param string $name |
||
114 | * @return array|null |
||
115 | */ |
||
116 | public function getAggregation($name) |
||
121 | |||
122 | /** |
||
123 | * @return bool |
||
124 | */ |
||
125 | public function hasAggregations() |
||
129 | |||
130 | /** |
||
131 | * @return array |
||
132 | */ |
||
133 | public function getAggregations() |
||
137 | |||
138 | /** |
||
139 | * return int |
||
140 | */ |
||
141 | public function getCount() |
||
145 | |||
146 | /** |
||
147 | * {@inheritdoc} |
||
148 | */ |
||
149 | public function rewind() |
||
153 | |||
154 | /** |
||
155 | * {@inheritdoc} |
||
156 | */ |
||
157 | public function current() |
||
161 | |||
162 | /** |
||
163 | * {@inheritdoc} |
||
164 | */ |
||
165 | public function key() |
||
169 | |||
170 | /** |
||
171 | * {@inheritdoc} |
||
172 | */ |
||
173 | public function next() |
||
177 | |||
178 | /** |
||
179 | * {@inheritdoc} |
||
180 | */ |
||
181 | public function valid() |
||
185 | } |
||
186 |