spoof
 All Data Structures Namespaces Files Functions Variables Pages
ConditionGroup Class Reference
Inheritance diagram for ConditionGroup:
Collaboration diagram for ConditionGroup:

Public Member Functions

 __construct (ICondition $condition)
 addCondition ($operator, ICondition $condition)

Data Fields

 $condition
 $conditions
 $operators
const OPERATOR_AND = 1
const OPERATOR_OR = 2

Detailed Description

Simple SQL condition group class. This class is used to describe a simple SQL condition group that is used to merge 2 or more SQL conditions or SQL condition groups themselves by SQL operators.

See also:
DBCondition

Constructor & Destructor Documentation

__construct ( ICondition  $condition)

Constructor.

Parameters:
ICondition$conditionobject that will act as an initial condition

Member Function Documentation

addCondition (   $operator,
ICondition  $condition 
)

Adds an additional database condition to the group.

Parameters:
string$operatoroperator used to merge the additional database condition
ICondition$conditionobject being merged

Field Documentation

$condition

Initial database condition. Property used to store the initial database condition.

$conditions

Array of conditions. Property used to store array of additional database conditions to be merged.

$operators

Array of operators. Property used to store array of database operators associated with additional merged database conditions.

const OPERATOR_AND = 1

Condition operators These should be used by name, e.g. DBConditionGroup::OPERATOR_AND

const OPERATOR_OR = 2

The documentation for this class was generated from the following file: