# Abstract Class yii\db\conditions\ConjunctionCondition

Inheritance | yii\db\conditions\ConjunctionCondition
Implements | yii\db\conditions\ConditionInterface
Subclasses | yii\db\conditions\AndCondition, yii\db\conditions\OrCondition
Available since version | 2.0.14
Source Code | https://github.com/yiisoft/yii2/blob/master/framework/db/conditions/ConjunctionCondition.php

Class ConjunctionCondition

## Protected Properties

Hide inherited properties

Property | Type | Description | Defined By
--- | --- | --- | ---

## Public Methods

Hide inherited methods

Method | Description | Defined By
--- | --- | ---
__construct() |  | yii\db\conditions\ConjunctionCondition
fromArrayDefinition() | Creates object by array-definition as described in Query Builder – Operator format guide article. | yii\db\conditions\ConjunctionCondition
getExpressions() |  | yii\db\conditions\ConjunctionCondition
getOperator() | Returns the operator that is represented by this condition class, e.g. `AND`, `OR`. | yii\db\conditions\ConjunctionCondition

## Property Details

Hide inherited properties

$expressions protected property
protected array $expressions = null

## Method Details

Hide inherited methods

__construct() public method

public void __construct ( $expressions )
$expressions | mixed |

Source code

                    public function __construct($expressions) // TODO: use variadic params when PHP>5.6
    {
        $this->expressions = $expressions;
    }

fromArrayDefinition() public static method

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

Source code

                    public static function fromArrayDefinition($operator, $operands)
    {
        return new static($operands);
    }

getExpressions() public method

public array getExpressions ( )

Source code

                    public function getExpressions()
    {
        return $this->expressions;
    }

getOperator() public abstract method

Returns the operator that is represented by this condition class, e.g. `AND`, `OR`.

public abstract string getOperator ( )

Source code

                    abstract public function getOperator();