Documentation

Filter
in package

Class for compiling filter statement

Table of Contents

addFilterCondition()  : array<string|int, mixed>
Method adds where condition
addFilterConditionFromArr()  : array<string|int, mixed>
Method adds where condition
compileWhere()  : array<string|int, mixed>
Complex where compilation
getArg()  : string
Method returns argument
getOperator()  : string
Method returns simple operator
getStatement()  : string
Method compiles statement

Methods

addFilterCondition()

Method adds where condition

public static addFilterCondition(array<string|int, mixed> $where) : array<string|int, mixed>
Parameters
$where : array<string|int, mixed>

conditions

Return values
array<string|int, mixed>

conditions

addFilterConditionFromArr()

Method adds where condition

public static addFilterConditionFromArr(array<string|int, mixed> $arr, array<string|int, mixed> $where) : array<string|int, mixed>
Parameters
$arr : array<string|int, mixed>

array of fields to be fetched

$where : array<string|int, mixed>

conditions

Return values
array<string|int, mixed>

conditions

compileWhere()

Complex where compilation

protected static compileWhere(array<string|int, mixed> $arr, array<string|int, mixed> $where) : array<string|int, mixed>
Parameters
$arr : array<string|int, mixed>

list of structured expressions

$where : array<string|int, mixed>

list of compiled conditions

Return values
array<string|int, mixed>

new list of compiled conditons

getArg()

Method returns argument

protected static getArg(string|array<string|int, mixed>|int|float $arg[, mixed $op = false ]) : string
Parameters
$arg : string|array<string|int, mixed>|int|float

argument name orr value

$op : mixed = false

pperator

Return values
string

argument

getOperator()

Method returns simple operator

protected static getOperator(array<string|int, mixed> $item) : string
Parameters
$item : array<string|int, mixed>

expression item with operator

Return values
string

operator

getStatement()

Method compiles statement

protected static getStatement(array<string|int, mixed> $item) : string
Parameters
$item : array<string|int, mixed>

expression

Return values
string

compiled expression

Search results