yii\db\conditions\SimpleCondition - Yii2 类参考手册
Class yii\db\conditions\SimpleCondition
全部
| 方法 Methods
Inheritance | yii\db\conditions\SimpleCondition |
---|---|
Implements | yii\db\conditions\ConditionInterface |
Subclasses | yii\db\conditions\LikeCondition |
Available since version | 2.0.14 |
Class SimpleCondition represents a simple condition like "column" operator value
.
Public Methods
隐藏继承的方法 Hide inherited methods
方法 Method | 简介 Description | 定义在 Defined By |
---|---|---|
__construct() | SimpleCondition constructor | yii\db\conditions\SimpleCondition |
fromArrayDefinition() | Creates object by array-definition as described in Query Builder – Operator format guide article. | yii\db\conditions\SimpleCondition |
getColumn() | yii\db\conditions\SimpleCondition | |
getOperator() | yii\db\conditions\SimpleCondition | |
getValue() | yii\db\conditions\SimpleCondition |
方法详情 Method Details
SimpleCondition constructor
public void __construct ( $column, $operator, $value ) | ||
$column | mixed | The literal to the left of $operator |
$operator | string | The operator to use. Anything could be used e.g. |
$value | mixed | The literal to the right of $operator |
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\InvalidArgumentException | if wrong number of operands have been given. |
---|
public mixed getColumn ( ) |
public string getOperator ( ) |
public mixed getValue ( ) |