类 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);
}
注册 或 登录 评论。