ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilADTLocationDBBridge.php
Go to the documentation of this file.
1 <?php
2 
3 require_once "Services/ADT/classes/Bridges/class.ilADTDBBridge.php";
4 
6 {
7  protected function isValidADT(ilADT $a_adt)
8  {
9  return ($a_adt instanceof ilADTLocation);
10  }
11 
12 
13  // CRUD
14 
15  public function readRecord(array $a_row)
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  }
21 
22  public function prepareInsert(array &$a_fields)
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  }
28 }
29 
30 ?>