Class yii\db\conditions\ExistsCondition

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

Condition that represents EXISTS operator.

方法详情

__construct() public 方法

ExistsCondition constructor.

public void __construct ( $operator, $query )
$operator string

The operator to use (e.g. EXISTS or NOT EXISTS)

$query yii\db\Query

The yii\db\Query object representing the sub-query.

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\InvalidParamException

if input parameters are not suitable for this condition

getOperator() public 方法

public string getOperator ( )
getQuery() public 方法

public yii\db\Query getQuery ( )