Public Member Functions | |
add ($column, $value=null, $comparison=LEGACY_EXPRESSION_EQ) | |
addAnd ($column, $value=null, $comparison=LEGACY_EXPRESSION_EQ) | |
addOr ($column, $value=null, $comparison=LEGACY_EXPRESSION_EQ) | |
& | createCriterion () |
_checkColumn ($column) | |
_castingConversion ($column, &$value) | |
Public Attributes | |
$mChildlen = array() |
This class have to be separated from any specific resource. It's possible to use for handlers of web service.
[Example 1] A = 1 AND B < 2 (SQL) $criteria->add('A', 1); $criteria->add('B', 2, '<');
[Example 2] A = 1 OR (B > 1 AND B < 5) (SQL) $criteria->add('A', 1); $subCriteria = $criteria->createCriteria(); $subCriteria->add('B', 1, '>'); $subCriteria->add('B', 5, '<'); $criteria->addOr($subCriteria);
[Warning] This class don't receive $criteria as reference.
[Note] We planned modifying old Criteria of XOOPS2 for Legacy generations. But, old Criteria class has some fatal problems for this plan unfortunately. Plus, it's manner violation that old class are patched to fundamental defect if it come to have two different class characteristics. Therefore we should make new Criteria that is like old Criteria. (Perhaps, old Criteria was created as Torque like)
Legacy_Criteria::add | ( | $ | column, | |
$ | value = null , |
|||
$ | comparison = LEGACY_EXPRESSION_EQ | |||
) |
This is alias for addAnd().
Legacy_Criteria::addAnd | ( | $ | column, | |
$ | value = null , |
|||
$ | comparison = LEGACY_EXPRESSION_EQ | |||
) |
Add $criteria to childlen with AND condition.
Legacy_Criteria::addOr | ( | $ | column, | |
$ | value = null , |
|||
$ | comparison = LEGACY_EXPRESSION_EQ | |||
) |
Add $criteria to childlen with OR condition.
& Legacy_Criteria::createCriterion | ( | ) |
Create the instance of this class which has the same type information, and return it.
Legacy_Criteria::_checkColumn | ( | $ | column | ) |
Check whether specified column exists in the list.
protected
Legacy_Criteria::_castingConversion | ( | $ | column, | |
&$ | value | |||
) |
Do casting conversion. If type information is wrong, return false.
protected
$column | string A name of column | |
$value | reference of value. |
Legacy_Criteria::$mChildlen = array() |
Childlen of this criteria.