Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
QueryResponse.php
Go to the documentation of this file.
1 <?php
7 
11 
18 {
24  protected $documents;
25 
31  protected $aggregations;
32 
38  {
39  $this->documents = $documents;
40  $this->aggregations = $aggregations;
41  }
42 
47  public function count()
48  {
49  return count($this->documents);
50  }
51 
57  public function getIterator()
58  {
59  return new \ArrayIterator($this->documents);
60  }
61 
65  public function getAggregations()
66  {
67  return $this->aggregations;
68  }
69 }
__construct(array $documents, AggregationInterface $aggregations)