0 follower

Final Class Yiisoft\Db\QueryBuilder\Condition\Not

InheritanceYiisoft\Db\QueryBuilder\Condition\Not
ImplementsYiisoft\Db\QueryBuilder\Condition\ConditionInterface

Condition that represents NOT operator (negation).

Public Methods

Hide inherited methods

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

Property Details

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( array|Yiisoft\Db\Expression\ExpressionInterface|string|null $condition )
$condition array|Yiisoft\Db\Expression\ExpressionInterface|string|null

The condition to negate.

                public function __construct(
    public readonly ExpressionInterface|array|string|null $condition,
) {}

            
fromArrayDefinition() public static method

Creates a condition based on the given operator and operands.

public static self fromArrayDefinition ( string $operator, array $operands )
$operator string
$operands array
throws InvalidArgumentException

If the number of operands isn't 1.

                public static function fromArrayDefinition(string $operator, array $operands): self
{
    return new self(self::validateCondition($operator, $operands));
}