Jelix 1.7.18

jDaoConditions
in package

container for all criteria of a query.

Tags
subpackage

dao

Table of Contents

$condition  : jDaoCondition
$order  : mixed
the orders we wants the list to be.
$_currentCondition  : mixed
the condition we actually are browsing.
__construct()  : mixed
addCondition()  : mixed
adds a condition.
addItemOrder()  : mixed
add an order clause.
endGroup()  : mixed
ends a condition group.
hasConditions()  : bool
says if there are no conditions.
isEmpty()  : bool
says if there are no conditions nor order.
startGroup()  : mixed
starts a new condition group.

Properties

$_currentCondition

the condition we actually are browsing.

private mixed $_currentCondition

Methods

__construct()

public __construct([string $glueOp = 'AND' ]) : mixed
Parameters
$glueOp : string = 'AND'

the logical operator which links each conditions : AND or OR

Return values
mixed

addCondition()

adds a condition.

public addCondition(string $field_id, string $operator, string $value[, string $field_pattern = '%s' ][, bool $foo = false ]) : mixed
Parameters
$field_id : string

the property name on which the condition applies

$operator : string

the sql operator

$value : string

the value which is compared to the property

$field_pattern : string = '%s'

the pattern to use on the property (WHERE clause)

$foo : bool = false

parameter for internal use : don't use it or set to false

Tags
throws
jException
Return values
mixed

addItemOrder()

add an order clause.

public addItemOrder(string $field_id[, string $way = 'ASC' ][, bool $allowAnyWay = false ]) : mixed
Parameters
$field_id : string

the property name used to order results

$way : string = 'ASC'

the order type : asc or desc

$allowAnyWay : bool = false

true if the value of $way should be checked. Internal use. Not recommended because it may cause security issues

Tags
throws
jException
Return values
mixed

hasConditions()

says if there are no conditions.

public hasConditions() : bool
Tags
since
1.0
Return values
bool

false if there isn't condition

isEmpty()

says if there are no conditions nor order.

public isEmpty() : bool
Return values
bool

false if there isn't condition

startGroup()

starts a new condition group.

public startGroup([string $glueOp = 'AND' ]) : mixed
Parameters
$glueOp : string = 'AND'

the logical operator which links each conditions in the group : AND or OR

Tags
throws
jException
Return values
mixed

Search results