\Elastica\AggregationIpRange

Class IpRange.

Summary

Methods
Properties
Constants
__construct()
setField()
addRange()
addMaskRange()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(string  $name, string  $field) 

Parameters

string $name

the name of this aggregation

string $field

the field on which to perform this aggregation

setField()

setField(string  $field) : $this

Set the field for this aggregation.

Parameters

string $field

the name of the document field on which to perform this aggregation

Returns

$this

addRange()

addRange(string  $fromValue = null, string  $toValue = null) : $this

Add an ip range to this aggregation.

Parameters

string $fromValue

a valid ipv4 address. Low end of this range, exclusive (greater than)

string $toValue

a valid ipv4 address. High end of this range, exclusive (less than)

Throws

\Elastica\Exception\InvalidException

Returns

$this

addMaskRange()

addMaskRange(string  $mask) : $this

Add an ip range in the form of a CIDR mask.

Parameters

string $mask

a valid CIDR mask

Returns

$this