ExpressionOperator
class ExpressionOperator extends BaseExpression
Defines the supported image characteristics for conditional transformations.
Learn more: Supported image characteristics
Methods
ExpressionComponent constructor.
Serializes to string.
Serializes to JSON.
The asset's current width.
The asset's initial width.
The asset's current height.
The asset's initial height.
The aspect ratio of the asset. The compared value can be either decimal (e.g., 1.5) or a ratio (e.g., 3:4)
The initial aspect ratio of the asset.
The aspect ratio of the image IF it was trimmed (using the Effect::trim effect) without actually trimming the image.
The total number of pages in the image/document.
The total number of detected faces in the image.
The likelihood that the image is an illustration (as opposed to a photo).
The current page in the image/document.
The page X.
The page Y.
The set of tags assigned to the asset.
A context value assigned to an asset.
Generic (future) predefined variable name.
Sets the user variable by name.
Sets the integer value.
Sets the float value.
Sets the numeric value.
Sets the string value.
Sets the value.
Sets the asset reference value.
Sets the expression value.
Details
__construct($exprUserVariableName)
ExpressionComponent constructor.
string
__toString()
Serializes to string.
mixed
jsonSerialize()
Serializes to JSON.
Expression
width()
The asset's current width.
Expression
initialWidth()
The asset's initial width.
Expression
height()
The asset's current height.
Expression
initialHeight()
The asset's initial height.
Expression
aspectRatio()
The aspect ratio of the asset. The compared value can be either decimal (e.g., 1.5) or a ratio (e.g., 3:4)
Expression
initialAspectRatio()
The initial aspect ratio of the asset.
Expression
trimmedAspectRatio()
The aspect ratio of the image IF it was trimmed (using the Effect::trim effect) without actually trimming the image.
The compared value can be either decimal (e.g., 1.5) or a ratio (e.g., 3:4).
Expression
pageCount()
The total number of pages in the image/document.
Expression
faceCount()
The total number of detected faces in the image.
Expression
illustrationScore()
The likelihood that the image is an illustration (as opposed to a photo).
Supported values: 0 (photo) to 1 (illustration)
Expression
currentPage()
The current page in the image/document.
Expression
pageX()
The page X.
Expression
pageY()
The page Y.
Expression
tags()
The set of tags assigned to the asset.
Used with the Expression::in or Expression::notIn operators.
Note: The syntax for this characteristic is slightly different:
if_!
Expression
context()
A context value assigned to an asset.
Expression
generic(string $genericPredefinedVariable)
Generic (future) predefined variable name.
Expression
uVar(string $variableName)
Sets the user variable by name.
Expression
int(int $value)
Sets the integer value.
Expression
float(float $value)
Sets the float value.
Expression
numeric(int|float|mixed $value)
Sets the numeric value.
Expression
string(string $value)
Sets the string value.
Expression
stringArray(array $value)
Sets the value.
Expression
assetReference(string $publicId)
Sets the asset reference value.
ExpressionTrait
expression(mixed $value)
Sets the expression value.