ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
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 196 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 189 of file class.ilADTDBBridge.php.
ilADTDBBridge::buildPrimaryWhere | ( | ) |
Convert primary keys array to sql string.
Definition at line 134 of file class.ilADTDBBridge.php.
References $def, $DIC, $ilDB, array, prepareInsert(), and readRecord().
Referenced by ilADTMultiDBBridge\afterDelete(), ilADTMultiDBBridge\afterUpdate(), ilADTMultiDBBridge\readRecord(), and ilADTMultiEnumDBBridge\readRecord().
ilADTDBBridge::getADT | ( | ) |
Get ADT.
Definition at line 63 of file class.ilADTDBBridge.php.
References $adt.
Referenced by ilADTGroupDBBridge\prepareElements(), ilADTEnumDBBridge\prepareInsert(), ilADTTextDBBridge\prepareInsert(), ilADTBooleanDBBridge\prepareInsert(), ilADTIntegerDBBridge\prepareInsert(), ilADTFloatDBBridge\prepareInsert(), ilADTLocationDBBridge\prepareInsert(), ilADTDateDBBridge\prepareInsert(), ilADTDateTimeDBBridge\prepareInsert(), ilADTInternalLinkDBBridge\prepareInsert(), ilADTExternalLinkDBBridge\prepareInsert(), ilADTMultiEnumDBBridge\prepareInsert(), ilADTMultiTextDBBridge\prepareMultiInsert(), ilADTMultiEnumDBBridge\prepareMultiInsert(), ilADTMultiTextDBBridge\readMultiRecord(), ilADTMultiEnumDBBridge\readMultiRecord(), ilADTDateDBBridge\readRecord(), ilADTDateTimeDBBridge\readRecord(), ilADTTextDBBridge\readRecord(), ilADTEnumDBBridge\readRecord(), ilADTIntegerDBBridge\readRecord(), ilADTFloatDBBridge\readRecord(), ilADTBooleanDBBridge\readRecord(), ilADTLocationDBBridge\readRecord(), ilADTMultiEnumDBBridge\readRecord(), ilADTInternalLinkDBBridge\readRecord(), ilADTExternalLinkDBBridge\readRecord(), ilADTGroupDBBridge\setPrimary(), and ilADTGroupDBBridge\setTable().
ilADTDBBridge::getElementId | ( | ) |
Get element id.
Definition at line 103 of file class.ilADTDBBridge.php.
References $id.
Referenced by ilADTMultiDBBridge\getSubTableName(), ilADTEnumDBBridge\prepareInsert(), ilADTTextDBBridge\prepareInsert(), ilADTIntegerDBBridge\prepareInsert(), ilADTBooleanDBBridge\prepareInsert(), ilADTFloatDBBridge\prepareInsert(), ilADTLocationDBBridge\prepareInsert(), ilADTDateTimeDBBridge\prepareInsert(), ilADTDateDBBridge\prepareInsert(), ilADTInternalLinkDBBridge\prepareInsert(), ilADTExternalLinkDBBridge\prepareInsert(), ilADTMultiEnumDBBridge\prepareInsert(), ilADTMultiTextDBBridge\prepareMultiInsert(), ilADTMultiEnumDBBridge\prepareMultiInsert(), ilADTMultiTextDBBridge\readMultiRecord(), ilADTMultiEnumDBBridge\readMultiRecord(), ilADTDateTimeDBBridge\readRecord(), ilADTEnumDBBridge\readRecord(), ilADTDateDBBridge\readRecord(), ilADTTextDBBridge\readRecord(), ilADTIntegerDBBridge\readRecord(), ilADTFloatDBBridge\readRecord(), ilADTBooleanDBBridge\readRecord(), ilADTLocationDBBridge\readRecord(), ilADTMultiDBBridge\readRecord(), ilADTMultiEnumDBBridge\readRecord(), ilADTExternalLinkDBBridge\readRecord(), and ilADTInternalLinkDBBridge\readRecord().
ilADTDBBridge::getPrimary | ( | ) |
Get primary fields.
Definition at line 123 of file class.ilADTDBBridge.php.
References $primary.
Referenced by ilADTMultiDBBridge\afterUpdate(), ilADTGroupDBBridge\prepareElements(), and ilADTGroupDBBridge\setPrimary().
ilADTDBBridge::getTable | ( | ) |
Get table name.
Definition at line 83 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 181 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 93 of file class.ilADTDBBridge.php.
References string.
ilADTDBBridge::setPrimary | ( | array | $a_value | ) |
Set primary fields (in MDB2 format)
array | $a_value |
Definition at line 113 of file class.ilADTDBBridge.php.
ilADTDBBridge::setTable | ( | $a_table | ) |
Set table name.
string | $a_table |
Definition at line 73 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().