/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Database/Expression
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Database/Expression/UnaryExpression.php (3049B)
_operator = $operator;
$this->_value = $value;
$this->_mode = $mode;
}
/**
* Converts the expression to its string representation
*
* @param \Cake\Database\ValueBinder $generator Placeholder generator object
* @return string
*/
public function sql(ValueBinder $generator): string
{
$operand = $this->_value;
if ($operand instanceof ExpressionInterface) {
$operand = $operand->sql($generator);
}
if ($this->_mode === self::POSTFIX) {
return '(' . $operand . ') ' . $this->_operator;
}
return $this->_operator . ' (' . $operand . ')';
}
/**
* @inheritDoc
*/
public function traverse(Closure $visitor)
{
if ($this->_value instanceof ExpressionInterface) {
$visitor($this->_value);
$this->_value->traverse($visitor);
}
return $this;
}
/**
* Perform a deep clone of the inner expression.
*
* @return void
*/
public function __clone()
{
if ($this->_value instanceof ExpressionInterface) {
$this->_value = clone $this->_value;
}
}
}