ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilADTTextDBBridge Class Reference
+ Inheritance diagram for ilADTTextDBBridge:
+ Collaboration diagram for ilADTTextDBBridge:

Public Member Functions

 readRecord (array $a_row)
 Import DB values to ADT.
 prepareInsert (array &$a_fields)
 Prepare ADT values for insert.
- Public Member Functions inherited from ilADTDBBridge
 __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.
 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.
- Protected Member Functions inherited from ilADTDBBridge
 setADT (ilADT $a_adt)
 Set ADT.

Additional Inherited Members

- Protected Attributes inherited from ilADTDBBridge
 $adt
 $table
 $id
 $primary

Detailed Description

Definition at line 5 of file class.ilADTTextDBBridge.php.

Member Function Documentation

ilADTTextDBBridge::isValidADT ( ilADT  $a_adt)
protected

Check if given ADT is valid.

:TODO: This could be avoided with type-specifc constructors :TODO: bridge base class?

Parameters
ilADT$a_adt

Reimplemented from ilADTDBBridge.

Definition at line 7 of file class.ilADTTextDBBridge.php.

{
return ($a_adt instanceof ilADTText);
}
ilADTTextDBBridge::prepareInsert ( array &  $a_fields)

Prepare ADT values for insert.

Parameters
array&$a_fields

Reimplemented from ilADTDBBridge.

Definition at line 19 of file class.ilADTTextDBBridge.php.

References ilADTDBBridge\getADT(), and ilADTDBBridge\getElementId().

{
$a_fields[$this->getElementId()] = array("text", $this->getADT()->getText());
}

+ Here is the call graph for this function:

ilADTTextDBBridge::readRecord ( array  $a_row)

Import DB values to ADT.

Parameters
array$a_row

Reimplemented from ilADTDBBridge.

Definition at line 14 of file class.ilADTTextDBBridge.php.

References ilADTDBBridge\getADT(), and ilADTDBBridge\getElementId().

{
$this->getADT()->setText($a_row[$this->getElementId()]);
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: