PHP Class yii\elasticsearch\ActiveDataProvider

It allows to fetch not only rows and total rows count, but full query results including aggregations and so on. Note: this data provider fetches result models and total count using single ElasticSearch query, so results total count will be fetched after pagination limit applying, which eliminates ability to verify if requested page number actually exist. Data provider disables [[yii\data\Pagination::validatePage]] automatically because of this.
Since: 2.0.5
Author: Paul Klimov ([email protected])
Inheritance: extends yii\data\ActiveDataProvider
Datei anzeigen Open project: yiisoft/yii2-elasticsearch

Public Methods

Method Description
getAggregation ( string $name ) : array Returns results of the specified aggregation.
getAggregations ( ) : array
getQueryResults ( ) : array
setQueryResults ( array $results )

Protected Methods

Method Description
prepareKeys ( $models )
prepareModels ( )
prepareTotalCount ( )

Method Details

getAggregation() public method

Returns results of the specified aggregation.
public getAggregation ( string $name ) : array
$name string aggregation name.
return array aggregation results.

getAggregations() public method

public getAggregations ( ) : array
return array all aggregations results

getQueryResults() public method

public getQueryResults ( ) : array
return array full query results

prepareKeys() protected method

protected prepareKeys ( $models )

prepareModels() protected method

protected prepareModels ( )

prepareTotalCount() protected method

protected prepareTotalCount ( )

setQueryResults() public method

public setQueryResults ( array $results )
$results array full query results