0 follower

Final Class Yiisoft\Db\QueryBuilder\Condition\NotBetween

InheritanceYiisoft\Db\QueryBuilder\Condition\NotBetween » Yiisoft\Db\QueryBuilder\Condition\AbstractBetween
ImplementsYiisoft\Db\QueryBuilder\Condition\ConditionInterface

Condition that's represented NOT BETWEEN operator is used to check if a value is not between two values.

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Db\QueryBuilder\Condition\AbstractBetween
fromArrayDefinition() Creates a condition based on the given operator and operands. Yiisoft\Db\QueryBuilder\Condition\AbstractBetween

Method Details

Hide inherited methods

__construct() public method
public mixed __construct ( Yiisoft\Db\Expression\ExpressionInterface|string $column, mixed $intervalStart, mixed $intervalEnd )
$column Yiisoft\Db\Expression\ExpressionInterface|string

The column name.

$intervalStart mixed

Beginning of the interval.

$intervalEnd mixed

End of the interval.

                final public function __construct(
    public readonly string|ExpressionInterface $column,
    public readonly mixed $intervalStart,
    public readonly mixed $intervalEnd,
) {}

            
fromArrayDefinition() public static method

Defined in: Yiisoft\Db\QueryBuilder\Condition\AbstractBetween::fromArrayDefinition()

Creates a condition based on the given operator and operands.

public static Yiisoft\Db\QueryBuilder\Condition\NotBetween fromArrayDefinition ( string $operator, array $operands )
$operator string
$operands array
throws InvalidArgumentException

If the number of operands isn't 3.

                final public static function fromArrayDefinition(string $operator, array $operands): static
{
    if (!isset($operands[0], $operands[1], $operands[2])) {
        throw new InvalidArgumentException("Operator '$operator' requires three operands.");
    }
    return new static(
        self::validateColumn($operator, $operands[0]),
        $operands[1],
        $operands[2],
    );
}