ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilADTLocationDBBridge.php
Go to the documentation of this file.
1<?php
2
3require_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?>
ADT DB bridge base class.
getElementId()
Get element id.
prepareInsert(array &$a_fields)
Prepare ADT values for insert.
isValidADT(ilADT $a_adt)
Check if given ADT is valid.
readRecord(array $a_row)
Import DB values to ADT.
ADT base class.
Definition: class.ilADT.php:12