HumHub Documentation (unofficial)

BetweenCondition
in package
implements ConditionInterface

Class BetweenCondition represents a `BETWEEN` condition.

Tags
author

Dmytro Naumenko d.naumenko.a@gmail.com

since
2.0.14
phpcs:disable

Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore

Table of Contents

Interfaces

ConditionInterface
Interface ConditionInterface should be implemented by classes that represent a condition in DBAL of framework.

Properties

$column  : mixed
$intervalEnd  : mixed
$intervalStart  : mixed
$operator  : string

Methods

__construct()  : mixed
Creates a condition with the `BETWEEN` operator.
fromArrayDefinition()  : $this
Creates object by array-definition as described in [Query Builder – Operator format](guide:db-query-builder#operator-format) guide article.
getColumn()  : mixed
getIntervalEnd()  : mixed
getIntervalStart()  : mixed
getOperator()  : string

Properties

$column

private mixed $column

the column name to the left of [[operator]]

$operator

private string $operator

the operator to use (e.g. BETWEEN or NOT BETWEEN)

Methods

__construct()

Creates a condition with the `BETWEEN` operator.

public __construct(mixed $column, string $operator, mixed $intervalStart, mixed $intervalEnd) : mixed
Parameters
$column : mixed

the literal to the left of $operator

$operator : string

the operator to use (e.g. BETWEEN or NOT BETWEEN)

$intervalStart : mixed

beginning of the interval

$intervalEnd : mixed

end of the interval

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
throws
InvalidArgumentException

if wrong number of operands have been given.

Return values
$this

        
On this page

Search results