jDaoConditions
in package
container for all criteria of a query
Tags
Table of Contents
- $condition : jDaoCondition
- $group : mixed
- the groups we wants the list to be
- $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
- addItemGroup() : mixed
- add a group clause
- 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
$condition
public
jDaoCondition
$condition
$group
the groups we wants the list to be
public
mixed
$group
= array()
Tags
$order
the orders we wants the list to be
public
mixed
$order
= array()
$_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
Return values
mixed —addItemGroup()
add a group clause
public
addItemGroup(string $field_id) : mixed
Parameters
- $field_id : string
-
the property name used to group results
Tags
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
Return values
mixed —endGroup()
ends a condition group
public
endGroup() : mixed
Return values
mixed —hasConditions()
says if there are no conditions
public
hasConditions() : bool
Tags
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