Offers a method to convert values to ExpressionInterface objects if the type they should be converted to implements ExpressionTypeInterface
Conditionally converts the passed value to an ExpressionInterface object if the type class implements the ExpressionTypeInterface. Otherwise, returns the value unmodified.
Returns an array with the types that require values to be casted to expressions, out of the list of type names passed as parameter.
_castToExpression(mixed $value, ?string $type)
Conditionally converts the passed value to an ExpressionInterface object if the type class implements the ExpressionTypeInterface. Otherwise, returns the value unmodified.
mixed
$value The value to converto to ExpressionInterface
string|null
$type optional The type name
mixed
_requiresToExpressionCasting(array $types)
Returns an array with the types that require values to be casted to expressions, out of the list of type names passed as parameter.
array
$types List of type names
array
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/trait-Cake.Database.Type.ExpressionTypeCasterTrait.html