The constructor enables the relation object to be configured.
RocksRelation
__construct
(string $foriegnKey, string $otherTable, string $otherTableForiegnKey, [string $relationName = null], [string $relationType = null])
-
string
$foriegnKey: the foriegn key in the current object that this relationship should be created on
-
string
$otherTable: the other table this relationship is with
-
string
$otherTableForiegnKey: the key in the other table that this relationship is with
-
string
$relationName: the name of the relationship
-
string
$relationType: the type of the relationship if it is a one to one relationship or not
void
AddExcludedValue
( $value)
The orders the items that are returned in the relationship
void
AddOrderBy
(string $fieldName, [string $orderDirection = null])
-
string
$fieldName: the field name to be ordered
-
string
$orderDirection: the direction the field should be ordered. This can either take the values RocksDesc or RocksAsc.
The adds a relation object to the existing relation object
void
AddRelation
(string $foriegnKey, string $otherTable, string $otherTableForiegnKey, [string $relationName = null], [string $relationType = null])
-
string
$foriegnKey: the foriegn key in the current object that this relationship should be created on
-
string
$otherTable: the other table this relationship is with
-
string
$otherTableForiegnKey: the key in the other table that this relationship is with
-
string
$relationName: the name of the relationship
-
string
$relationType: the type of the relationship if it is a one to one relationship or not
void
Alternative
( $relation)
void
GetNextAlternativeRelation
()
Returns the SQL representing the ordering, this is usually used internally.
void
GetOrderBy
()
This is the number of relations this relationship has
void
HasRelations
()
void
IsExcludedValue
( $value)
void
__set
( $var, $varValue)