SimpleCondition
in package
implements
ConditionInterface
Class SimpleCondition represents a simple condition like `"column" operator value`.
Tags
Table of Contents
Interfaces
- ConditionInterface
- Interface ConditionInterface should be implemented by classes that represent a condition in DBAL of framework.
Properties
Methods
- __construct() : mixed
- SimpleCondition constructor
- fromArrayDefinition() : $this
- Creates object by array-definition as described in [Query Builder – Operator format](guide:db-query-builder#operator-format) guide article.
- getColumn() : mixed
- getOperator() : string
- getValue() : mixed
Properties
$column
private
mixed
$column
the column name to the left of [[operator]]
$operator
private
string
$operator
the operator to use. Anything could be used e.g. >
, <=
, etc.
$value
private
mixed
$value
the value to the right of the [[operator]]
Methods
__construct()
SimpleCondition constructor
public
__construct(mixed $column, string $operator, mixed $value) : mixed
Parameters
- $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()
Creates object by array-definition as described in [Query Builder – Operator format](guide:db-query-builder#operator-format) guide article.
public
static fromArrayDefinition(mixed $operator, mixed $operands) : $this
Parameters
- $operator : mixed
-
operator in uppercase.
- $operands : mixed
-
array of corresponding operands
Tags
Return values
$thisgetColumn()
public
getColumn() : mixed
getOperator()
public
getOperator() : string
Return values
stringgetValue()
public
getValue() : mixed