resultSet = $resultSet; } /** * {@inheritDoc} */ public function toArray() { return array_map(function (Result $result) { return $result->getSource(); }, $this->resultSet->getResults()); } /** * {@inheritDoc} */ public function getTotalHits() { return $this->resultSet->getTotalHits(); } /** * {@inheritDoc} */ public function getFacets() { if ($this->resultSet->hasFacets()) { return $this->resultSet->getFacets(); } return; } }