Xataface  2.0alpha2
Xataface Application Framework
 All Data Structures Namespaces Files Functions Variables Groups Pages
Public Member Functions | Data Fields
Dataface_Relationship_ForeignKey Class Reference

Public Member Functions

 Dataface_Relationship_ForeignKey (&$relationship, $labels, $label)
 getFields ()
 getFurthestField ()

Data Fields

 $fields = array()
 $relationship = null

Detailed Description

A marker class to mark values in Dataface_Relationship::getForeignKeyValues() that haven't been filled in. We use a class so that we don't get it confused with another valid scalar value.

Definition at line 1822 of file Relationship.php.

Member Function Documentation

Dataface_Relationship_ForeignKey ( $relationship,
  $labels,
  $label 
)

Constructor.

Parameters
array$labelsThe map of field names to labels in the relationship.
string$labelThe label that this foreign key refers to.

Definition at line 1831 of file Relationship.php.

getFields ( )

Returns array of field names associated with this foreign key. The field names are absolute (i.e. in the form "TableName.FieldName"

Returns
array(string)

Definition at line 1843 of file Relationship.php.

getFurthestField ( )

Returns the name of the field in the furthest table from the source table of the relationship. This is a valuable field to know since usually it is the furthest table that is the domain table of the relationship, and hence since a foreign key specifies 2 fields we usually want to know which field is more important on forms - as we don't want to give the user two fields for the same value.

Returns
string The field in this foreign key furthest from the source table. This is an absolute field name (e.g. tablename.fieldname).

Definition at line 1858 of file Relationship.php.

Field Documentation

$fields = array()

Definition at line 1823 of file Relationship.php.

$relationship = null

Definition at line 1824 of file Relationship.php.


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