ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilADTIntegerDBBridge.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected function isValidADT(ilADT $a_adt): bool
24 {
25 return ($a_adt instanceof ilADTInteger);
26 }
27
28 // CRUD
29
30 public function readRecord(array $a_row): void
31 {
32 $this->getADT()->setNumber($a_row[$this->getElementId()]);
33 }
34
35 public function prepareInsert(array &$a_fields): void
36 {
37 $a_fields[$this->getElementId()] = array("integer", $this->getADT()->getNumber());
38 }
39}
ADT DB bridge base class.
getElementId()
Get element id.
readRecord(array $a_row)
Import DB values to ADT.
prepareInsert(array &$a_fields)
Prepare ADT values for insert.
ADT base class.
Definition: class.ilADT.php:26