An expression object that represents an expression with only a single operand.
int
1
int
0
int
Where to place the operator
string
The operator this unary expression represents
mixed
Holds the value which the unary expression operates
Iterates over each part of the expression recursively for every level of the expressions tree and executes the $visitor callable passing as first parameter the instance of the expression currently being iterated.
__clone()
Perform a deep clone of the inner expression.
__construct(string $operator, mixed $value, mixed $mode)
Constructor
string
$operator The operator to used for the expression
mixed
$value the value to use as the operand for the expression
int
$mode optional either UnaryExpression::PREFIX or UnaryExpression::POSTFIX
sql(\Cake\Database\ValueBinder $generator)
Converts the expression to its string representation
\Cake\Database\ValueBinder
$generator Placeholder generator object
string
traverse(\Closure $visitor)
Iterates over each part of the expression recursively for every level of the expressions tree and executes the $visitor callable passing as first parameter the instance of the expression currently being iterated.
\Closure
$visitor The callable to apply to all nodes.
$this
Where to place the operator
int
The operator this unary expression represents
string
Holds the value which the unary expression operates
mixed
© 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/class-Cake.Database.Expression.UnaryExpression.html