ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
ADT DB bridge base class. More...
Public Member Functions | |
__construct (ilADT $a_adt) | |
Constructor. More... | |
getADT () | |
Get ADT. More... | |
setTable ($a_table) | |
Set table name. More... | |
getTable () | |
Get table name. More... | |
setElementId ($a_value) | |
Set element id (aka DB column[s] [prefix]) More... | |
getElementId () | |
Get element id. More... | |
setPrimary (array $a_value) | |
Set primary fields (in MDB2 format) More... | |
getPrimary () | |
Get primary fields. More... | |
buildPrimaryWhere () | |
Convert primary keys array to sql string. More... | |
readRecord (array $a_row) | |
Import DB values to ADT. More... | |
prepareInsert (array &$a_fields) | |
Prepare ADT values for insert. More... | |
afterInsert () | |
After insert hook to enable sub-tables. More... | |
prepareUpdate (array &$a_fields) | |
Prepare ADT values for update. More... | |
afterUpdate () | |
After update hook to enable sub-tables. More... | |
afterDelete () | |
After delete hook to enable sub-tables. More... | |
Protected Member Functions | |
isValidADT (ilADT $a_adt) | |
Check if given ADT is valid. More... | |
setADT (ilADT $a_adt) | |
Set ADT. More... | |
Protected Attributes | |
$adt | |
$table | |
$id | |
$primary | |
ilADTDBBridge::__construct | ( | ilADT | $a_adt | ) |
Constructor.
ilADT | $a_adt |
Definition at line 24 of file class.ilADTDBBridge.php.
References isValidADT(), and setADT().
ilADTDBBridge::afterDelete | ( | ) |
After delete hook to enable sub-tables.
Definition at line 198 of file class.ilADTDBBridge.php.
ilADTDBBridge::afterInsert | ( | ) |
After insert hook to enable sub-tables.
Definition at line 171 of file class.ilADTDBBridge.php.
ilADTDBBridge::afterUpdate | ( | ) |
After update hook to enable sub-tables.
Definition at line 190 of file class.ilADTDBBridge.php.
ilADTDBBridge::buildPrimaryWhere | ( | ) |
Convert primary keys array to sql string.
Definition at line 135 of file class.ilADTDBBridge.php.
References $ilDB, array, prepareInsert(), and readRecord().
Referenced by ilADTMultiDBBridge\afterDelete(), and ilADTMultiDBBridge\afterUpdate().
ilADTDBBridge::getADT | ( | ) |
Get ADT.
Definition at line 64 of file class.ilADTDBBridge.php.
References $adt.
Referenced by ilADTGroupDBBridge\prepareElements(), ilADTEnumDBBridge\prepareInsert(), ilADTTextDBBridge\prepareInsert(), ilADTBooleanDBBridge\prepareInsert(), ilADTFloatDBBridge\prepareInsert(), ilADTIntegerDBBridge\prepareInsert(), ilADTLocationDBBridge\prepareInsert(), ilADTDateDBBridge\prepareInsert(), ilADTDateTimeDBBridge\prepareInsert(), ilADTMultiEnumDBBridge\prepareInsert(), ilADTMultiTextDBBridge\prepareMultiInsert(), ilADTMultiEnumDBBridge\prepareMultiInsert(), ilADTMultiTextDBBridge\readMultiRecord(), ilADTMultiEnumDBBridge\readMultiRecord(), ilADTDateTimeDBBridge\readRecord(), ilADTEnumDBBridge\readRecord(), ilADTDateDBBridge\readRecord(), ilADTTextDBBridge\readRecord(), ilADTFloatDBBridge\readRecord(), ilADTIntegerDBBridge\readRecord(), ilADTLocationDBBridge\readRecord(), ilADTBooleanDBBridge\readRecord(), ilADTMultiEnumDBBridge\readRecord(), ilADTGroupDBBridge\setPrimary(), and ilADTGroupDBBridge\setTable().
ilADTDBBridge::getElementId | ( | ) |
Get element id.
Definition at line 104 of file class.ilADTDBBridge.php.
References $id.
Referenced by ilADTMultiDBBridge\getSubTableName(), ilADTEnumDBBridge\prepareInsert(), ilADTTextDBBridge\prepareInsert(), ilADTFloatDBBridge\prepareInsert(), ilADTBooleanDBBridge\prepareInsert(), ilADTIntegerDBBridge\prepareInsert(), ilADTLocationDBBridge\prepareInsert(), ilADTDateDBBridge\prepareInsert(), ilADTDateTimeDBBridge\prepareInsert(), ilADTMultiEnumDBBridge\prepareInsert(), ilADTMultiTextDBBridge\prepareMultiInsert(), ilADTMultiEnumDBBridge\prepareMultiInsert(), ilADTMultiTextDBBridge\readMultiRecord(), ilADTMultiEnumDBBridge\readMultiRecord(), ilADTDateDBBridge\readRecord(), ilADTTextDBBridge\readRecord(), ilADTDateTimeDBBridge\readRecord(), ilADTEnumDBBridge\readRecord(), ilADTBooleanDBBridge\readRecord(), ilADTFloatDBBridge\readRecord(), ilADTLocationDBBridge\readRecord(), ilADTIntegerDBBridge\readRecord(), and ilADTMultiEnumDBBridge\readRecord().
ilADTDBBridge::getPrimary | ( | ) |
Get primary fields.
Definition at line 124 of file class.ilADTDBBridge.php.
References $primary.
Referenced by ilADTMultiDBBridge\afterUpdate(), ilADTGroupDBBridge\prepareElements(), and ilADTGroupDBBridge\setPrimary().
ilADTDBBridge::getTable | ( | ) |
Get table name.
Definition at line 84 of file class.ilADTDBBridge.php.
References $table.
Referenced by ilADTMultiDBBridge\getSubTableName(), ilADTGroupDBBridge\prepareElements(), and ilADTGroupDBBridge\setTable().
|
abstractprotected |
Check if given ADT is valid.
:TODO: This could be avoided with type-specifc constructors :TODO: bridge base class?
ilADT | $a_adt |
Referenced by __construct(), and setADT().
|
abstract |
Prepare ADT values for insert.
array | &$a_fields |
Referenced by buildPrimaryWhere(), and prepareUpdate().
ilADTDBBridge::prepareUpdate | ( | array & | $a_fields | ) |
Prepare ADT values for update.
array | &$a_fields |
Definition at line 182 of file class.ilADTDBBridge.php.
References prepareInsert().
|
abstract |
Import DB values to ADT.
array | $a_row |
Referenced by buildPrimaryWhere().
|
protected |
Set ADT.
Exception |
ilADT | $a_adt |
Definition at line 49 of file class.ilADTDBBridge.php.
References isValidADT().
Referenced by __construct().
ilADTDBBridge::setElementId | ( | $a_value | ) |
Set element id (aka DB column[s] [prefix])
string | $a_value |
Definition at line 94 of file class.ilADTDBBridge.php.
References string.
ilADTDBBridge::setPrimary | ( | array | $a_value | ) |
Set primary fields (in MDB2 format)
array | $a_value |
Definition at line 114 of file class.ilADTDBBridge.php.
ilADTDBBridge::setTable | ( | $a_table | ) |
Set table name.
string | $a_table |
Definition at line 74 of file class.ilADTDBBridge.php.
References string.
|
protected |
Definition at line 13 of file class.ilADTDBBridge.php.
Referenced by getADT().
|
protected |
Definition at line 15 of file class.ilADTDBBridge.php.
Referenced by getElementId().
|
protected |
Definition at line 16 of file class.ilADTDBBridge.php.
Referenced by getPrimary().
|
protected |
Definition at line 14 of file class.ilADTDBBridge.php.
Referenced by getTable().