ILIAS  release_5-2 Revision v5.2.25-18-g3f80b82851
ilADTLocationDBBridge Class Reference
+ Inheritance diagram for ilADTLocationDBBridge:
+ Collaboration diagram for ilADTLocationDBBridge:

Public Member Functions

 readRecord (array $a_row)
 
 prepareInsert (array &$a_fields)
 
- Public Member Functions inherited from ilADTDBBridge
 __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)
 
- Protected Member Functions inherited from ilADTDBBridge
 isValidADT (ilADT $a_adt)
 Check if given ADT is valid. More...
 
 setADT (ilADT $a_adt)
 Set ADT. More...
 

Additional Inherited Members

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

Detailed Description

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

Member Function Documentation

◆ isValidADT()

ilADTLocationDBBridge::isValidADT ( ilADT  $a_adt)
protected

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

8  {
9  return ($a_adt instanceof ilADTLocation);
10  }

◆ prepareInsert()

ilADTLocationDBBridge::prepareInsert ( array $a_fields)

Definition at line 22 of file class.ilADTLocationDBBridge.php.

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

23  {
24  $a_fields[$this->getElementId()."_long"] = array("float", $this->getADT()->getLongitude());
25  $a_fields[$this->getElementId()."_lat"] = array("float", $this->getADT()->getLatitude());
26  $a_fields[$this->getElementId()."_zoom"] = array("integer", $this->getADT()->getZoom());
27  }
getElementId()
Get element id.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ readRecord()

ilADTLocationDBBridge::readRecord ( array  $a_row)

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

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

16  {
17  $this->getADT()->setLongitude($a_row[$this->getElementId()."_long"]);
18  $this->getADT()->setLatitude($a_row[$this->getElementId()."_lat"]);
19  $this->getADT()->setZoom($a_row[$this->getElementId()."_zoom"]);
20  }
getElementId()
Get element id.
+ Here is the call graph for this function:

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