ILIAS
Release_5_0_x_branch Revision 61816
|
ADT DB bridge base class. More...
Public Member Functions | |
__construct (ilADT $a_adt) | |
Constructor. | |
getADT () | |
Get ADT. | |
setTable ($a_table) | |
Set table name. | |
getTable () | |
Get table name. | |
setElementId ($a_value) | |
Set element id (aka DB column[s] [prefix]) | |
getElementId () | |
Get element id. | |
setPrimary (array $a_value) | |
Set primary fields (in MDB2 format) | |
getPrimary () | |
Get primary fields. | |
buildPrimaryWhere () | |
Convert primary keys array to sql string. | |
readRecord (array $a_row) | |
Import DB values to ADT. | |
prepareInsert (array &$a_fields) | |
Prepare ADT values for insert. | |
afterInsert () | |
After insert hook to enable sub-tables. | |
prepareUpdate (array &$a_fields) | |
Prepare ADT values for update. | |
afterUpdate () | |
After update hook to enable sub-tables. | |
afterDelete () | |
After delete hook to enable sub-tables. |
Protected Member Functions | |
isValidADT (ilADT $a_adt) | |
Check if given ADT is valid. | |
setADT (ilADT $a_adt) | |
Set ADT. |
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 setADT().
ilADTDBBridge::afterDelete | ( | ) |
After delete hook to enable sub-tables.
Reimplemented in ilADTGroupDBBridge, and ilADTMultiDBBridge.
Definition at line 198 of file class.ilADTDBBridge.php.
ilADTDBBridge::afterInsert | ( | ) |
After insert hook to enable sub-tables.
Reimplemented in ilADTGroupDBBridge, and ilADTMultiDBBridge.
Definition at line 171 of file class.ilADTDBBridge.php.
ilADTDBBridge::afterUpdate | ( | ) |
After update hook to enable sub-tables.
Reimplemented in ilADTGroupDBBridge, and ilADTMultiDBBridge.
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.
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 |
Reimplemented in ilADTMultiEnumDBBridge, ilADTGroupDBBridge, ilADTBooleanDBBridge, ilADTDateDBBridge, ilADTDateTimeDBBridge, ilADTEnumDBBridge, ilADTFloatDBBridge, ilADTIntegerDBBridge, ilADTLocationDBBridge, ilADTMultiTextDBBridge, and ilADTTextDBBridge.
Referenced by setADT().
|
abstract |
Prepare ADT values for insert.
array | &$a_fields |
Reimplemented in ilADTGroupDBBridge, ilADTMultiEnumDBBridge, ilADTMultiDBBridge, ilADTDateDBBridge, ilADTDateTimeDBBridge, ilADTLocationDBBridge, ilADTBooleanDBBridge, ilADTFloatDBBridge, ilADTIntegerDBBridge, ilADTEnumDBBridge, and ilADTTextDBBridge.
Referenced by 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 |
Reimplemented in ilADTGroupDBBridge, ilADTMultiEnumDBBridge, ilADTMultiDBBridge, ilADTBooleanDBBridge, ilADTFloatDBBridge, ilADTIntegerDBBridge, ilADTLocationDBBridge, ilADTDateDBBridge, ilADTDateTimeDBBridge, ilADTEnumDBBridge, and ilADTTextDBBridge.
|
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.
ilADTDBBridge::setPrimary | ( | array | $a_value | ) |
Set primary fields (in MDB2 format)
array | $a_value |
Reimplemented in ilADTGroupDBBridge.
Definition at line 114 of file class.ilADTDBBridge.php.
ilADTDBBridge::setTable | ( | $a_table | ) |
Set table name.
string | $a_table |
Reimplemented in ilADTGroupDBBridge.
Definition at line 74 of file class.ilADTDBBridge.php.
|
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().