Filter

A filter holds information for filtering data via the API.

Example:

$filter = new Filter('created', '2018-10-23', '>=');

If you want to filter for NULL values, you can pass the string 'NULL' as value.

package

NextEvent\PHPSDK\Util

Methods

__construct

__construct(string $name, integer|string|array|boolean $value, string $operator = '=') 

Arguments

$name

string

The name of the parameter.

$value

integer|string|array|boolean

The value to filter for.

$operator

string

The operator. The supported values depend on the requested endpoint.

getName

getName() : string

Response

string

getOperator

getOperator() : string

Response

string

getValue

getValue() : array|string|integer|boolean

Response

array|string|integer|boolean

Sets the name of this filter.

setName(string $name) : \NextEvent\PHPSDK\Util\Filter

Arguments

$name

string

Response

\NextEvent\PHPSDK\Util\Filter

Sets the filter operator.

setOperator(string $operator) : \NextEvent\PHPSDK\Util\Filter

Arguments

$operator

string

Response

\NextEvent\PHPSDK\Util\Filter

Sets the value to filter for.

setValue(array|string|integer|boolean $value) : \NextEvent\PHPSDK\Util\Filter

Arguments

$value

array|string|integer|boolean

Response

\NextEvent\PHPSDK\Util\Filter

Coverts this filter to an array so it can be used with NextEvent\PHPSDK\Util\Query.

toArray() : array

Response

array