Sleimanx2\Plastic\PlasticResult::__construct PHP Method

__construct() public method

_construct.
public __construct ( array $results )
$results array
    public function __construct(array $results)
    {
        $this->took = $results['took'];
        $this->timed_out = $results['timed_out'];
        $this->shards = $results['_shards'];
        $this->hits = new Collection($results['hits']['hits']);
        $this->totalHits = $results['hits']['total'];
        $this->maxScore = $results['hits']['max_score'];
        $this->aggregations = isset($results['aggregations']) ? $results['aggregations'] : [];
    }