NotCondition
API reference › yii › db › conditions › NotCondition
Condition that inverts passed condition.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | NotCondition constructor. | NotCondition |
fromArrayDefinition() static | Creates object by array-definition as described in Query Builder – Operator format guide article. | NotCondition |
getCondition() | NotCondition |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(mixed $condition)NotCondition constructor.
Parameters
| Parameter | Type | Description |
|---|---|---|
$condition | mixed | The condition to be negated |
fromArrayDefinition()
Section titled “fromArrayDefinition() ”public static function fromArrayDefinition(mixed $operator, mixed $operands): staticCreates object by array-definition as described in Query Builder – Operator format guide article.
Parameters
| Parameter | Type | Description |
|---|---|---|
$operator | mixed | Operator in uppercase. |
$operands | mixed | Array of corresponding operands |
Returns
static
Throws
yii\base\InvalidArgumentException: if wrong number of operands have been given.