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 = array())

Constructor.

addMultiple(array $parts = array())

Adds multiple parts to composite expression.

add(mixed $part)

Adds an expression to composite expression.

integer
count()

Retrieves the amount of expressions on composite expression.

string
__toString()

Retrieve the string representation of this composite expression.

string
getType()

Return type of this composite expression (AND/OR)

Details

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

Constructor.

Parameters

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

CompositeExpression addMultiple(array $parts = array())

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

integer count()

Retrieves the amount of expressions on composite expression.

Return Value

integer

string __toString()

Retrieve the string representation of this composite expression.

Return Value

string

string getType()

Return type of this composite expression (AND/OR)

Return Value

string