_castToExpression()
_castToExpression(mixed $value, string $type) : mixed
Conditionally converts the passed value to an ExpressionInterface object if the type class implements the ExpressionTypeInterface. Otherwise, returns the value unmodified.
Parameters
mixed | $value | The value to converto to ExpressionInterface |
string | $type | The type name |