Login |  Register 
This has got to be one of the most frequently updated PHP sites, keep up the good work...
Max
 

RocksRelation Class

Description

This class represents a relationship in the database. When this is executed it will return either an array of RocksDBO objects or just a single one. This is usualy used internally.

  • property: string $foriegnKey: the name of the field in the dbo table that is the foriegn key
  • property: string $otherTable: the name of the other table that it relates to
  • property: string $otherTableForiegnKey: the name of the foriegn key in the other table
  • property: string $relationName: the name of the relationship
  • property: string $relationType: the type of relationship this can be null or RocksOneToOne
  • property: array $relations: this is a array of RocksRelation which represent the relationships related to this relationship
  • property: array $orderBys: this is a array of RocksOrderBy which represent the ordering of this relationship
  • author: Dominic Skinner
  • version: 0.2.1
  • abstract:

Located in /RocksRelation.php (line 19)


	
			
Method Summary
RocksRelation __construct (string $foriegnKey, string $otherTable, string $otherTableForiegnKey, [string $relationName = null], [string $relationType = null])
void AddExcludedValue ( $value)
void AddOrderBy (string $fieldName, [string $orderDirection = null])
void AddRelation (string $foriegnKey, string $otherTable, string $otherTableForiegnKey, [string $relationName = null], [string $relationType = null])
void Alternative ( $relation)
void GetOrderBy ()
void HasRelations ()
void IsExcludedValue ( $value)
void __get ( $name)
void __set ( $var,  $varValue)
Methods
Constructor __construct (line 41)

The constructor enables the relation object to be configured.

  • access: public
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
AddExcludedValue (line 146)
  • access: public
void AddExcludedValue ( $value)
  • $value
AddOrderBy (line 91)

The orders the items that are returned in the relationship

  • access: public
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.
AddRelation (line 71)

The adds a relation object to the existing relation object

  • access: public
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
Alternative (line 122)
  • access: public
void Alternative ( $relation)
  • $relation
GetNextAlternativeRelation (line 133)
  • access: public
void GetNextAlternativeRelation ()
GetOrderBy (line 100)

Returns the SQL representing the ordering, this is usually used internally.

  • access: public
void GetOrderBy ()
HasRelations (line 80)

This is the number of relations this relationship has

  • access: public
void HasRelations ()
IsExcludedValue (line 152)
  • access: public
void IsExcludedValue ( $value)
  • $value
__get (line 157)
  • access: public
void __get ( $name)
  • $name
__set (line 166)
  • access: public
void __set ( $var,  $varValue)
  • $var
  • $varValue

No comments have been provided.
security image

Written by Dominic Skinner
Last Updated: 2011-10-25 16:00:38