HashCondition
API reference › yii › db › conditions › HashCondition
Condition based on column-value pairs.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | HashCondition constructor. | HashCondition |
fromArrayDefinition() static | Creates object by array-definition as described in Query Builder – Operator format guide article. | HashCondition |
getHash() | HashCondition |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(array|null $hash)HashCondition constructor.
Parameters
| Parameter | Type | Description |
|---|---|---|
$hash | array| |
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
InvalidArgumentException: if input parameters are not suitable for this condition