DiscoveredReflection
class DiscoveredReflection extends Object implements IReflection
Reflection metadata class with discovery for a database.
Properties
protected Connection | $connection | ||
protected Cache | $cache | ||
protected array | $structure | ||
protected array | $loadedStructure |
Methods
__destruct()
No description
string|array
getPrimary($table)
Gets primary key of $table.
array
getHasManyReference($table, $key, $refresh = TRUE)
Gets referenced table & referenced column.
array
getBelongsToReference($table, $key, $refresh = TRUE)
Gets referenced table & referencing column.
reloadAllForeignKeys()
No description
reloadForeignKeys($table)
No description
Details
at line 36
__construct(Connection $connection, IStorage $cacheStorage = NULL)
Create autodiscovery structure.
at line 46
__destruct()
No description
at line 54
string|array
getPrimary($table)
Gets primary key of $table.
at line 79
array
getHasManyReference($table, $key, $refresh = TRUE)
Gets referenced table & referenced column.
Example: author, book returns array(book, author_id)
at line 124
array
getBelongsToReference($table, $key, $refresh = TRUE)
Gets referenced table & referencing column.
Example book, author returns array(author, author_id) book, translator returns array(author, translator_id)
at line 143
protected
reloadAllForeignKeys()
No description
at line 161
protected
reloadForeignKeys($table)
No description