PHP Class Elastica\Aggregation\AbstractAggregation

Inheritance: extends Elastica\Param
Show file Open project: ruflin/elastica Class Usage Examples

Protected Properties

Property Type Description
$_aggs Subaggregations belonging to this aggregation
$_name The name of this aggregation

Public Methods

Method Description
__construct ( string $name )
addAggregation ( AbstractAggregation $aggregation ) Add a sub-aggregation.
getAggs ( ) : array Retrieve all subaggregations belonging to this aggregation.
getName ( ) : string Retrieve the name of this aggregation.
setName ( string $name ) Set the name of this aggregation.
toArray ( ) : array

Method Details

__construct() public method

public __construct ( string $name )
$name string the name of this aggregation

addAggregation() public method

Add a sub-aggregation.
public addAggregation ( AbstractAggregation $aggregation )
$aggregation AbstractAggregation

getAggs() public method

Retrieve all subaggregations belonging to this aggregation.
public getAggs ( ) : array
return array

getName() public method

Retrieve the name of this aggregation.
public getName ( ) : string
return string

setName() public method

Set the name of this aggregation.
public setName ( string $name )
$name string

toArray() public method

public toArray ( ) : array
return array

Property Details

$_aggs protected property

Subaggregations belonging to this aggregation
protected $_aggs

$_name protected property

The name of this aggregation
protected $_name