class SearchRelation
|
$leftField |
The searched class field referenced by related class |
$rightClass |
Related class name or class instance |
$rightField |
The field the related class references the searched class by |
$joinType |
Type of join |
function __construct ($leftField, $rightClass, $rightField, $joinType = 'INNER') |
Constructor.
$leftField: The searched class field referenced by related class $rightClass: Related class name or class instance $rightField: The field the related class references the searched class by $joinType: Type of join, one of 'LEFT', 'INNER', 'RIGHT' |
RelatedKey properties
|
$field |
Database field name, inherited from SearchKey. It applies to the last class in the $relations property. |
$value |
Value to be compared, inherited from SearchKey. See SearchKey Properties, Methods and Examples for explanation. |
$comparator |
field : value comparator, inherited. See SearchKey Properties, Methods and Examples for explanation. |
$orderBy |
Optional ordering field, inherited from SearchKey.
The $orderBy property applies to the last class in the $relations property.
Multiple $orderBy ordering is given by the SearchKey structure maybe not fitting the ordering desired. Therefore, it is possible to fix it by explicite setting the $orderBy position like "(1)name", "(2)created desc" etc. |
$andKey |
Optional another SearchKey related with SQL "AND", inherited from SearchKey |
$orKey |
Optional another SearchKey related with SQL "OR", inherited from SearchKey |
$relations |
An instance or an array of SearchRelation |
$relatedAndKey |
Optional another SearchKey related with SQL "AND", applying to the last class in the $relations propery. |
$relatedOrKey |
Optional another SearchKey related with SQL "OR", applying to the last class in the $relations propery. |
RelatedKey Methods
|
function __construct ($relation, $field = '', $value = 0, $cmp = self::CMP_EQUAL, $partial = false) |
Constructor
$relation: An instance or an array of SearchRelation. In latter case, $relatedAndKey and $relatedOrKey concern the table defined by the last element; Arguments $field, $value and $cmp set corresponding fields. The argument $partial isused with string values and if true, it inserts SearchKey::STRING_WILDCARD before and after the value. |
function AddAndKey (SearchKey $key) |
Inserts the $key as the last element of the andKey chain, inherited from SearchKey |
function AddOrKey (SearchKey $key) |
Inserts the $key as the last element of the orKey chain, inherited from SearchKey |
function AddRelatedAndKey (SearchKey $key) |
Inserts the $key as the last element of the relaterAndKey chain. |
function AddRelatedOrKey (SearchKey $key) |
Inserts the $key as the last element of the relaterOrKey chain. |