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
Afficher le fichier Open project: yiisoft/yii2-elasticsearch

Méthodes publiques

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

Méthodes protégées

Méthode Description
prepareKeys ( $models )
prepareModels ( )
prepareTotalCount ( )

Method Details

getAggregation() public méthode

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

getAggregations() public méthode

public getAggregations ( ) : array
Résultat array all aggregations results

getQueryResults() public méthode

public getQueryResults ( ) : array
Résultat array full query results

prepareKeys() protected méthode

protected prepareKeys ( $models )

prepareModels() protected méthode

protected prepareModels ( )

prepareTotalCount() protected méthode

protected prepareTotalCount ( )

setQueryResults() public méthode

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