0 追蹤者

類別 yii\db\conditions\HashCondition

繼承關係yii\db\conditions\HashCondition
實作yii\db\conditions\ConditionInterface
自版本起可用2.0.14
原始碼 https://github.com/yiisoft/yii2/blob/master/framework/db/conditions/HashCondition.php

基於欄位-值配對的條件。

公開方法

隱藏繼承的方法

方法 描述 定義於
__construct() HashCondition 建構子。 yii\db\conditions\HashCondition
fromArrayDefinition() 依陣列定義建立物件,如 查詢建構器 – 運算子格式 指南文章中所述。 yii\db\conditions\HashCondition
getHash() yii\db\conditions\HashCondition

方法詳情

隱藏繼承的方法

__construct() public 方法

HashCondition 建構子。

public void __construct ( $hash )
$hash array|null

                public function __construct($hash)
{
    $this->hash = $hash;
}

            
fromArrayDefinition() public static 方法

依陣列定義建立物件,如 查詢建構器 – 運算子格式 指南文章中所述。

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

大寫的運算子。

$operands array

對應運算元的陣列

拋出 yii\base\InvalidParamException

如果輸入參數不適用於此條件

                public static function fromArrayDefinition($operator, $operands)
{
    return new static($operands);
}

            
getHash() public 方法

public array|null getHash ( )

                public function getHash()
{
    return $this->hash;
}