ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilADTDefinition.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
25abstract class ilADTDefinition
26{
27 protected bool $allow_null;
28
29 public function __construct()
30 {
31 $this->reset();
32 }
33
38 public function getType(): string
39 {
40 return substr(substr(get_class($this), 5), 0, -10);
41 }
42
46 public function reset(): void
47 {
48 $this->setAllowNull(true);
49 }
50
51
52 //
53 // null
54 //
55
60 public function setAllowNull(bool $a_value): void
61 {
62 $this->allow_null = $a_value;
63 }
64
65 public function isNullAllowed(): bool
66 {
67 return $this->allow_null;
68 }
69
70
71 //
72 // comparison
73 //
74
80 abstract public function isComparableTo(ilADT $a_adt): bool;
81}
ADT definition base class.
isComparableTo(ilADT $a_adt)
Check if given ADT is comparable to self.
reset()
Init property defaults.
getType()
Get type (from class/instance)
setAllowNull(bool $a_value)
Toggle null allowed status.
ADT base class.
Definition: class.ilADT.php:26