class PVar extends Expression

The predefined variables for specifying conditional transformations.

Learn more: Specifying conditions

Methods

__construct(string $name)

PVar 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.

width()

Predefined variable width.

initialWidth()

Predefined variable initialWidth.

height()

Predefined variable height.

initialHeight()

Predefined variable initialHeight.

aspectRatio()

Predefined variable aspectRatio.

initialAspectRatio()

Predefined variable initialAspectRatio.

trimmedAspectRatio()

Predefined variable trimmedAspectRatio.

pageCount()

Predefined variable pageCount.

duration()

Predefined variable duration.

initialDuration()

Predefined variable initialDuration.

faceCount()

Predefined variable faceCount.

illustrationScore()

Predefined variable illustrationScore.

currentPage()

Predefined variable currentPage.

pageX()

Predefined variable pageX.

pageY()

Predefined variable pageY.

tags()

Predefined variable tags.

context()

Predefined variable context.

getPredefinedVariables()

Gets a list of predefined variables.

getFriendlyRepresentations()

Gets a mapping of the friendly representations of the predefined variables.

Details

__construct(string $name)

PVar constructor.

Parameters

Name Type Description
$name string The predefined 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 PredefinedVariableTrait width()

Predefined variable width.

static PredefinedVariableTrait initialWidth()

Predefined variable initialWidth.

static PredefinedVariableTrait height()

Predefined variable height.

static PredefinedVariableTrait initialHeight()

Predefined variable initialHeight.

static PredefinedVariableTrait aspectRatio()

Predefined variable aspectRatio.

static PredefinedVariableTrait initialAspectRatio()

Predefined variable initialAspectRatio.

static PredefinedVariableTrait trimmedAspectRatio()

Predefined variable trimmedAspectRatio.

static PredefinedVariableTrait pageCount()

Predefined variable pageCount.

static PredefinedVariableTrait duration()

Predefined variable duration.

static PredefinedVariableTrait initialDuration()

Predefined variable initialDuration.

static PredefinedVariableTrait faceCount()

Predefined variable faceCount.

static PredefinedVariableTrait illustrationScore()

Predefined variable illustrationScore.

static PredefinedVariableTrait currentPage()

Predefined variable currentPage.

static PredefinedVariableTrait pageX()

Predefined variable pageX.

static PredefinedVariableTrait pageY()

Predefined variable pageY.

static PredefinedVariableTrait tags()

Predefined variable tags.

static PredefinedVariableTrait context()

Predefined variable context.

static array getPredefinedVariables()

Gets a list of predefined variables.

Return Value

array The predefined variables.

static array getFriendlyRepresentations()

Gets a mapping of the friendly representations of the predefined variables.

Return Value

array

Constants

WIDTH

INITIAL_WIDTH

HEIGHT

INITIAL_HEIGHT

ASPECT_RATIO

INITIAL_ASPECT_RATIO

TRIMMED_ASPECT_RATIO

PAGE_COUNT

DURATION

INITIAL_DURATION

FACE_COUNT

ILLUSTRATION_SCORE

CURRENT_PAGE

PAGE_X

PAGE_Y

TAGS

CONTEXT