.

DBFieldRelation Class Reference
[Model]

A relation between two fields in DB. More...

Inheritance diagram for DBFieldRelation:
IDBFieldRelation

List of all members.

Public Member Functions

  __construct ($source_field, $target_field)
  get_source_field_name ()
  Return source table name.
  get_target_field_name ()
  Return target table name.
  reverse ()
  Returns an IDBFieldRelation with source field as target field and vice versa.

Protected Attributes

  $source_field
  $target_field

Detailed Description

A relation between two fields in DB.

Author:
Gerd Riesselmann

Definition at line 8 of file dbfieldrelation.cls.php.


Constructor & Destructor Documentation

DBFieldRelation::__construct ( source_field,
target_field  
)

Definition at line 13 of file dbfieldrelation.cls.php.

00013                                                                   {
00014                 $this->source_field = $source_field;
00015                 $this->target_field = $target_field;
00016         }

Member Function Documentation

DBFieldRelation::get_source_field_name (  ) 

Return source table name.

Returns:
string

Implements IDBFieldRelation.

Definition at line 23 of file dbfieldrelation.cls.php.

00023                                                 {
00024                 return $this->source_field;
00025         }
DBFieldRelation::get_target_field_name (  ) 

Return target table name.

Returns:
string

Implements IDBFieldRelation.

Definition at line 32 of file dbfieldrelation.cls.php.

00032                                                 {
00033                 return $this->target_field;
00034         }
DBFieldRelation::reverse (  ) 

Returns an IDBFieldRelation with source field as target field and vice versa.

Returns:
IDBFieldRelation

Implements IDBFieldRelation.

Definition at line 41 of file dbfieldrelation.cls.php.

00041                                   {
00042                 return new DBFieldRelation($this->target_field, $this->source_field);
00043         }       

Member Data Documentation

DBFieldRelation::$source_field [protected]

Definition at line 10 of file dbfieldrelation.cls.php.

DBFieldRelation::$target_field [protected]

Definition at line 11 of file dbfieldrelation.cls.php.


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