類別 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 |
方法詳情
HashCondition 建構子。
public void __construct ( $hash ) | ||
$hash | array|null |
public function __construct($hash)
{
$this->hash = $hash;
}
依陣列定義建立物件,如 查詢建構器 – 運算子格式 指南文章中所述。
public static $this fromArrayDefinition ( $operator, $operands ) | ||
$operator | string |
大寫的運算子。 |
$operands | array |
對應運算元的陣列 |
拋出 | yii\base\InvalidParamException |
如果輸入參數不適用於此條件 |
---|
public static function fromArrayDefinition($operator, $operands)
{
return new static($operands);
}
註冊 或 登入 以發表評論。