class UVar extends Expression

Represents a user variable expression component.

Learn more: User variables

Methods

__construct(string|Variable $userVariableName)

UVar constructor.

__toString()

Serializes to string.

jsonSerialize()

Serializes to JSON.

add()

Add.

subtract()

Subtract.

multiply()

Multiply.

divide()

Divide.

modulo()

Modulo.

equal()

Equals.

notEqual()

Does not equal.

lessThan()

Less than.

greaterThan()

Greater than.

lessThanOrEqual()

Less than or equals.

greaterThanOrEqual()

Greater than or equals.

in()

Is in (a list of strings).

notIn()

Is not in (a list of strings).

and_()

Logical AND operator

or_()

Logical OR operator

expression(string $expression)

Creates an instance of Expression from a raw string.

uVar(string $userVariableName)

Named UVar constructor.

Details

__construct(string|Variable $userVariableName)

UVar constructor.

Parameters

Name Type Description
$userVariableName string|Variable The user variable name.

string __toString()

Serializes to string.

Return Value

string

mixed jsonSerialize()

Serializes to JSON.

Return Value

mixed

ExpressionOperator add()

Add.

Return Value

ExpressionOperator

ExpressionOperator subtract()

Subtract.

Return Value

ExpressionOperator

ExpressionOperator multiply()

Multiply.

Return Value

ExpressionOperator

ExpressionOperator divide()

Divide.

Return Value

ExpressionOperator

ExpressionOperator modulo()

Modulo.

Return Value

ExpressionOperator

ExpressionOperator equal()

Equals.

Return Value

ExpressionOperator

ExpressionOperator notEqual()

Does not equal.

Return Value

ExpressionOperator

ExpressionOperator lessThan()

Less than.

Return Value

ExpressionOperator

ExpressionOperator greaterThan()

Greater than.

Return Value

ExpressionOperator

ExpressionOperator lessThanOrEqual()

Less than or equals.

Return Value

ExpressionOperator

ExpressionOperator greaterThanOrEqual()

Greater than or equals.

Return Value

ExpressionOperator

ExpressionOperator in()

Is in (a list of strings).

Return Value

ExpressionOperator

ExpressionOperator notIn()

Is not in (a list of strings).

Return Value

ExpressionOperator

ExpressionOperator and_()

Logical AND operator

'&&'

Return Value

ExpressionOperator

ExpressionOperator or_()

Logical OR operator

'||'

Return Value

ExpressionOperator

static Expression expression(string $expression)

Creates an instance of Expression from a raw string.

Parameters

Name Type Description
$expression string Arithmetic expression

Return Value

Expression

static UVar uVar(string $userVariableName)

Named UVar constructor.

Parameters

Name Type Description
$userVariableName string The user variable name.

Return Value

UVar