Class yii\db\conditions\SimpleCondition

继承yii\db\conditions\SimpleCondition
实现yii\db\conditions\ConditionInterface
子类yii\db\conditions\LikeCondition
可用自版本2.0.14
源代码 https://github.com/yiisoft/yii2/blob/master/framework/db/conditions/SimpleCondition.php

Class SimpleCondition represents a simple condition like "column" operator value.

方法详情

__construct() public 方法

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. >, <=, etc.

$value mixed

The literal to the right of $operator

fromArrayDefinition() public static 方法

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.

getColumn() public 方法

public mixed getColumn ( )
getOperator() public 方法

public string getOperator ( )
getValue() public 方法

public mixed getValue ( )