ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilADTDefinition.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
25 abstract 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 }
isComparableTo(ilADT $a_adt)
Check if given ADT is comparable to self.
setAllowNull(bool $a_value)
Toggle null allowed status.
ADT base class.
Definition: class.ilADT.php:25
reset()
Init property defaults.
getType()
Get type (from class/instance)
ADT definition base class.