ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules 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  public function readRecord(array $a_row)
14  {
15  $this->getADT()->setLongitude($a_row[$this->getElementId() . "_long"]);
16  $this->getADT()->setLatitude($a_row[$this->getElementId() . "_lat"]);
17  $this->getADT()->setZoom($a_row[$this->getElementId() . "_zoom"]);
18  }
19 
20  public function prepareInsert(array &$a_fields)
21  {
22  $a_fields[$this->getElementId() . "_long"] = array("float", $this->getADT()->getLongitude());
23  $a_fields[$this->getElementId() . "_lat"] = array("float", $this->getADT()->getLatitude());
24  $a_fields[$this->getElementId() . "_zoom"] = array("integer", $this->getADT()->getZoom());
25  }
26 
27  public function supportsDefaultValueColumn() : bool
28  {
29  return false;
30  }
31 }
getElementId()
Get element id.
ADT base class.
Definition: class.ilADT.php:11
ADT DB bridge base class.