Handy helper class to generate and manipulate AND filter arrays.

This class is intended to be only used via the FilterBuilder main class.

 Methods

Create a new instance.

__construct(string $property, mixed $value, bool $isRemote, bool $isRemoteProp) 

Parameters

$property

string

The property name to be compared.

$value

mixed

The value to be compared against.

$isRemote

bool

Flag determining if the passed value is a remote property name (only valid if filter is for parent child relationship and not for root elements).

$isRemoteProp

bool

Flag determining if the passed value is a property or literal value (only valid when $isRemote is true).

Initialize an instance with the values from the given array.

fromArray(array $array) : mixed
Static

Parameters

$array

array

The initialization array.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralInvalidArgumentException When an invalid array has been passed.

Returns

mixed

{@inheritDoc}

get() 

Retrieve the property name.

getProperty() : string

Returns

string

Retrieve the value to filter for.

getValue() : mixed

Returns

mixed

Determine if this filter is for remote filtering or not.

isRemote() : boolean

Returns

boolean

Determine if the value is a property or literal value (Only valid if isRemote() == true).

isRemoteProperty() : boolean

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException When the filter is not flagged as remote.

Returns

boolean

Set the flag if this filter is for remote usage or not.

setIsRemote(boolean $isRemote) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\ModelRelationship\FilterBuilder\BaseComparingFilterBuilder

Set the flag that this filters value is a remote property.

setIsRemoteProperty(bool $isRemoteProp) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\ModelRelationship\FilterBuilder\BaseComparingFilterBuilder

Parameters

$isRemoteProp

bool

True when the value is to be credited as property name, false if it is a literal value.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException When the filter is not flagged as remote.

Returns

 Properties

 

Flag determining if the passed value is a remote property name or not.

$isRemote : bool
 

Flag determining if the remote value is a property or literal value.

$isRemoteProp : bool
 

The operation string.

$operation : string
 

The property to be checked.

$property : string
 

The property to be checked.

$remoteProperty : string
 

The value to compare against.

$value : mixed