Class yii\db\conditions\HashCondition
| Inheritance | yii\ |
|---|---|
| Implements | yii\ |
| Available since version | 2.0.14 |
| Source Code | https://github.com/yiisoft/yii2/blob/master/framework/db/conditions/HashCondition.php |
Condition based on column-value pairs.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | HashCondition constructor. | yii\ |
| fromArrayDefinition() | Creates object by array-definition as described in Query Builder – Operator format guide article. | yii\ |
| getHash() | yii\ |
Method Details
HashCondition constructor.
| public mixed __construct ( array|null $hash ) | ||
| $hash | array|null | |
public function __construct($hash)
{
$this->hash = $hash;
}
Creates object by array-definition as described in Query Builder – Operator format guide article.
| public static static fromArrayDefinition ( mixed $operator, mixed $operands ) | ||
| $operator | mixed |
Operator in uppercase. |
| $operands | mixed |
Array of corresponding operands |
| throws | yii\ |
if input parameters are not suitable for this condition |
|---|---|---|
public static function fromArrayDefinition($operator, $operands)
{
return new static($operands);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.