interface IReflection

Information about tables and columns structure.

Constants

FIELD_TEXT

FIELD_BINARY

FIELD_BOOL

FIELD_INTEGER

FIELD_FLOAT

FIELD_DATE

FIELD_TIME

FIELD_DATETIME

FIELD_UNIX_TIMESTAMP

FIELD_TIME_INTERVAL

Methods

string|array
getPrimary($table)

Gets primary key of $table.

array
getHasManyReference($table, $key)

Gets referenced table & referenced column.

array
getBelongsToReference($table, $key)

Gets referenced table & referencing column.

Details

at line 35
string|array getPrimary($table)

Gets primary key of $table.

Parameters

$table

Return Value

string|array

at line 48
array getHasManyReference($table, $key)

Gets referenced table & referenced column.

Example: author, book returns array(book, author_id)

Parameters

$table
$key

Return Value

array

array(referenced table, referenced column)

Exceptions

MissingReferenceException
AmbiguousReferenceKeyException

at line 61
array getBelongsToReference($table, $key)

Gets referenced table & referencing column.

Example book, author returns array(author, author_id) book, translator returns array(author, translator_id)

Parameters

$table
$key

Return Value

array

array(referenced table, referencing column)

Exceptions

MissingReferenceException