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

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.ilADTIntegerDBBridge.php.

Member Function Documentation

ilADTIntegerDBBridge::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.ilADTIntegerDBBridge.php.

{
return ($a_adt instanceof ilADTInteger);
}
ilADTIntegerDBBridge::prepareInsert ( array &  $a_fields)

Prepare ADT values for insert.

Parameters
array&$a_fields

Reimplemented from ilADTDBBridge.

Definition at line 20 of file class.ilADTIntegerDBBridge.php.

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

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

+ Here is the call graph for this function:

ilADTIntegerDBBridge::readRecord ( array  $a_row)

Import DB values to ADT.

Parameters
array$a_row

Reimplemented from ilADTDBBridge.

Definition at line 15 of file class.ilADTIntegerDBBridge.php.

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

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

+ Here is the call graph for this function:


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