Public Member Functions | |
__construct () | |
Construct a keydef. | |
addAttrib ($name) | |
Adds the named attribute to the KeyDef. | |
containsAttrib ($name) | |
Determines if the KeyDef contains the requested Attribute. | |
getAttrib ($pos) | |
getAttrib is 1 based. | |
size () | |
Returns number of columns in KeyDef. | |
Private Attributes | |
$cols | |
$size | |
Number of columns. |
Definition at line 60 of file KeyDef.php.
KeyDef::__construct | ( | ) |
Construct a keydef.
Accepts a variable number of arguments -- a list of coluns to use for keydef: $kd = new KeyDef('id'); // id col is pkey $kd = new KeyDef('key1', 'key2'); // multi-col pkey
Definition at line 78 of file KeyDef.php.
References size().
00079 { 00080 $this->cols = func_get_args(); 00081 $this->size = count($this->cols); 00082 }
KeyDef::addAttrib | ( | $ | name | ) |
KeyDef::containsAttrib | ( | $ | name | ) |
Determines if the KeyDef contains the requested Attribute.
string | $name |
Definition at line 101 of file KeyDef.php.
KeyDef::getAttrib | ( | $ | pos | ) |
getAttrib is 1 based.
Setting pos to 0 will attempt to return pos 1.
int | $pos 1-based position of attrib. |
Definition at line 111 of file KeyDef.php.
KeyDef::size | ( | ) |
Returns number of columns in KeyDef.
Definition at line 122 of file KeyDef.php.
Referenced by __construct(), and addAttrib().
00123 { 00124 return $this->size; 00125 }
KeyDef::$cols [private] |
Definition at line 63 of file KeyDef.php.
KeyDef::$size [private] |