ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 }
getElementId()
Get element id.
ADT base class.
Definition: class.ilADT.php:11
ADT DB bridge base class.
Create styles array
The data for the language used.