Abstract Class Yiisoft\Db\Expression\Function\MultiOperandFunction
Base class for functions that operate on multiple operands with the same type.
It provides methods to add operands and retrieve them.
See also Yiisoft\Db\Expression\Function\Builder\MultiOperandFunctionBuilder base class for building SQL representation of multi-operand function expressions.
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $operands | array | List of operands. | Yiisoft\Db\Expression\Function\MultiOperandFunction |
Public Methods
Property Details
Method Details
| public mixed __construct ( mixed $operands ) | ||
| $operands | mixed |
The values or expressions to operate on. String values will be treated as column names,
except when they contain a parentheses |
public function __construct(mixed ...$operands)
{
$this->operands = $operands;
}
| public Yiisoft\Db\Expression\Function\MultiOperandFunction add ( mixed $operand ) | ||
| $operand | mixed | |
public function add(mixed $operand): static
{
$this->operands[] = $operand;
return $this;
}
| public array getOperands ( ) | ||
| return | array |
List of operands. |
|---|---|---|
public function getOperands(): array
{
return $this->operands;
}
Signup or Login in order to comment.