ForeignKeyInfo Class Reference

List of all members.

Public Member Functions

 __construct ($name, $vendorInfo=array())
 getName ()
 Get foreign key name.
 addReference (ColumnInfo $local, ColumnInfo $foreign, $onDelete=self::NONE, $onUpdate=self::NONE)
 Adds a foreign-local mapping.
 getReferences ()
 Gets the local-foreign column mapping.
 getVendorSpecificInfo ()
 Get vendor specific optional information for this primary key.
 toString ()

Public Attributes

const NONE = ""
const NOACTION = "NO ACTION"
const CASCADE = "CASCADE"
const RESTRICT = "RESTRICT"
const SETDEFAULT = "SET DEFAULT"
const SETNULL = "SET NULL"

Protected Attributes

 $vendorSpecificInfo = array()

Private Attributes

 $name
 $references = array()


Detailed Description

Definition at line 30 of file ForeignKeyInfo.php.


Constructor & Destructor Documentation

ForeignKeyInfo::__construct ( name,
vendorInfo = array() 
)

Parameters:
string $name The name of the foreign key.

Definition at line 52 of file ForeignKeyInfo.php.

References $name.

00053     {
00054         $this->name = $name;
00055         $this->vendorSpecificInfo = $vendorInfo;
00056     }


Member Function Documentation

ForeignKeyInfo::addReference ( ColumnInfo local,
ColumnInfo foreign,
onDelete = self::NONE,
onUpdate = self::NONE 
)

Adds a foreign-local mapping.

Parameters:
ColumnInfo $local
ColumnInfo $foreign

Definition at line 72 of file ForeignKeyInfo.php.

00073     {
00074         $this->references[] = array($local, $foreign, $onDelete, $onUpdate);
00075     }

ForeignKeyInfo::getName (  ) 

Get foreign key name.

Returns:
string

Definition at line 62 of file ForeignKeyInfo.php.

00063     {
00064         return $this->name;
00065     }

ForeignKeyInfo::getReferences (  ) 

Gets the local-foreign column mapping.

Returns:
array array( [0] => array([0] => local ColumnInfo object, [1] => foreign ColumnInfo object, [2] => onDelete, [3] => onUpdate) )

Definition at line 81 of file ForeignKeyInfo.php.

00082     {
00083         return $this->references;
00084     }

ForeignKeyInfo::getVendorSpecificInfo (  ) 

Get vendor specific optional information for this primary key.

Returns:
array vendorSpecificInfo[]

Definition at line 90 of file ForeignKeyInfo.php.

00091     {
00092         return $this->vendorSpecificInfo;
00093     }

ForeignKeyInfo::toString (  ) 

Returns:
string

Definition at line 98 of file ForeignKeyInfo.php.

00099     {
00100         return $this->name;
00101     }


Member Data Documentation

ForeignKeyInfo::$name [private]

Definition at line 32 of file ForeignKeyInfo.php.

Referenced by __construct().

ForeignKeyInfo::$references = array() [private]

Definition at line 33 of file ForeignKeyInfo.php.

ForeignKeyInfo::$vendorSpecificInfo = array() [protected]

Definition at line 39 of file ForeignKeyInfo.php.

const ForeignKeyInfo::CASCADE = "CASCADE"

const ForeignKeyInfo::NOACTION = "NO ACTION"

Definition at line 43 of file ForeignKeyInfo.php.

const ForeignKeyInfo::RESTRICT = "RESTRICT"

const ForeignKeyInfo::SETDEFAULT = "SET DEFAULT"

Definition at line 46 of file ForeignKeyInfo.php.

Referenced by PgSQLTableInfo::initForeignKeys().

const ForeignKeyInfo::SETNULL = "SET NULL"


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

Generated on Wed May 6 23:10:49 2009 for fareofficelib by  doxygen 1.5.8