Copied!

AggregationResultCollection

AggregationResultCollection.php : 17
Implements Countable, IteratorAggregate

Methods

public__construct()

AggregationResultCollection.php : 25
public __construct([array<string|int, AggregationResult$results = [] ])

Parameters

Name Type Default value Description
$results array<string|int, AggregationResult> [] -

publiccount()

AggregationResultCollection.php : 110
public count() : int

Return values

int

publicfirst()

AggregationResultCollection.php : 62

Return first element of collection.

public first() : AggregationResult

Return values

AggregationResult

Tags
Throws
OutOfBoundsException

publicget()

AggregationResultCollection.php : 38

This method returns the aggregation result for the given aggregation name.

public get(string $name) : AggregationResult

Parameters

Name Type Default value Description
$name string - -

Return values

AggregationResult

Tags
Throws
OutOfBoundsException

publicgetIterator()

AggregationResultCollection.php : 105
public getIterator() : Iterator

Return values

Iterator

publichas()

AggregationResultCollection.php : 52

This method returns true if the aggregation result for the given aggregation name exists.

public has(string $name) : bool

Parameters

Name Type Default value Description
$name string - -

Return values

bool

publicisEmpty()

AggregationResultCollection.php : 90

Checks whether the collection is empty (contains no elements).

public isEmpty() : bool

Return values

bool

TRUE if the collection is empty, FALSE otherwise.

publiclast()

AggregationResultCollection.php : 76

Return last element of collection.

public last() : AggregationResult

Return values

AggregationResult

Tags
Throws
OutOfBoundsException

publictoArray()

AggregationResultCollection.php : 100

Gets a native PHP array representation of the collection.

public toArray() : array<string|int, FieldDefinition>

Return values

array<string|int, FieldDefinition>