Class yii\db\conditions\HashCondition

Inheritanceyii\db\conditions\HashCondition
Implementsyii\db\conditions\ConditionInterface
Available since version2.0.14
Source Code https://github.com/yiisoft/yii2/blob/master/framework/db/conditions/HashCondition.php

Condition based on column-value pairs.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() HashCondition constructor. yii\db\conditions\HashCondition
fromArrayDefinition() Creates object by array-definition as described in Query Builder – Operator format guide article. yii\db\conditions\HashCondition
getHash() yii\db\conditions\HashCondition

Method Details

__construct() public method

HashCondition constructor.

public void __construct ( $hash )
$hash array|null
fromArrayDefinition() public static method

Creates object by array-definition as described in Query Builder – Operator format guide article.

public static $this fromArrayDefinition ( $operator, $operands )
$operator string

Operator in uppercase.

$operands array

Array of corresponding operands

throws yii\base\InvalidParamException

if input parameters are not suitable for this condition

getHash() public method

public array|null getHash ( )