ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilADTDateDBBridge Class Reference
+ Inheritance diagram for ilADTDateDBBridge:
+ Collaboration diagram for ilADTDateDBBridge:

Public Member Functions

 readRecord (array $a_row)
 
 prepareInsert (array &$a_fields)
 
- Public Member Functions inherited from ilADTDBBridge
 __construct (ilADT $a_adt)
 Constructor. More...
 
 getADT ()
 
 setTable (string $a_table)
 
 getTable ()
 
 setElementId (string $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...
 
 getAdditionalPrimaryFields ()
 
 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)
 
 afterUpdate ()
 After update hook to enable sub-tables. More...
 
 afterDelete ()
 After delete hook to enable sub-tables. More...
 
 supportsDefaultValueColumn ()
 true if table storage relies on the default 'value' column More...
 

Protected Member Functions

 isValidADT (ilADT $a_adt)
 
- Protected Member Functions inherited from ilADTDBBridge
 isValidADT (ilADT $a_adt)
 
 setADT (ilADT $a_adt)
 

Additional Inherited Members

- Protected Attributes inherited from ilADTDBBridge
ilADT $adt
 
string $table
 
string $id
 
array $primary = []
 
ilDBInterface $db
 

Detailed Description

Definition at line 21 of file class.ilADTDateDBBridge.php.

Member Function Documentation

◆ isValidADT()

ilADTDateDBBridge::isValidADT ( ilADT  $a_adt)
protected

Definition at line 23 of file class.ilADTDateDBBridge.php.

23  : bool
24  {
25  return ($a_adt instanceof ilADTDate);
26  }

◆ prepareInsert()

ilADTDateDBBridge::prepareInsert ( array &  $a_fields)

Definition at line 39 of file class.ilADTDateDBBridge.php.

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

39  : void
40  {
41  $date = $this->getADT()->getDate();
42  if ($date instanceof ilDate) {
43  $date = $date->get(IL_CAL_DATE);
44  }
45  $a_fields[$this->getElementId()] = array("date", $date);
46  }
getElementId()
Get element id.
const IL_CAL_DATE
+ Here is the call graph for this function:

◆ readRecord()

ilADTDateDBBridge::readRecord ( array  $a_row)

Definition at line 30 of file class.ilADTDateDBBridge.php.

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

30  : void
31  {
32  $date = null;
33  if ($a_row[$this->getElementId()]) {
34  $date = new ilDate($a_row[$this->getElementId()], IL_CAL_DATE);
35  }
36  $this->getADT()->setDate($date);
37  }
getElementId()
Get element id.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const IL_CAL_DATE
+ Here is the call graph for this function:

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