class CompositeExpression implements Countable (View source)

Composite expression is responsible to build a group of similar expression.

Constants

TYPE_AND

Constant that represents an AND composite expression.

TYPE_OR

Constant that represents an OR composite expression.

Methods

__construct(string $type, array $parts = [])

No description

addMultiple(array $parts = [])

Adds multiple parts to composite expression.

add(mixed $part)

Adds an expression to composite expression.

int
count()

Retrieves the amount of expressions on composite expression.

string
__toString()

Retrieves the string representation of this composite expression.

string
getType()

Returns the type of this composite expression (AND/OR).

Details

__construct(string $type, array $parts = [])

Parameters

string $type Instance type of composite expression.
array $parts Composition of expressions to be joined on composite expression.

CompositeExpression addMultiple(array $parts = [])

Adds multiple parts to composite expression.

Parameters

array $parts

Return Value

CompositeExpression

CompositeExpression add(mixed $part)

Adds an expression to composite expression.

Parameters

mixed $part

Return Value

CompositeExpression

int count()

Retrieves the amount of expressions on composite expression.

Return Value

int

string __toString()

Retrieves the string representation of this composite expression.

Return Value

string

string getType()

Returns the type of this composite expression (AND/OR).

Return Value

string