Cake\ElasticSearch\ResultSet::__construct PHP Method

__construct() public method

Decorator's constructor
public __construct ( ResultSet $resultSet, Query $query )
$resultSet Elastica\ResultSet The results from Elastica to wrap
$query Elastica\Query The Elasticsearch Query object
    public function __construct($resultSet, $query)
    {
        $this->resultSet = $resultSet;
        $repo = $query->repository();
        foreach ($repo->embedded() as $embed) {
            $this->embeds[$embed->property()] = $embed;
        }
        $this->entityClass = $repo->entityClass();
        $this->repoName = $repo->name();
        parent::__construct($resultSet);
    }