ILIAS  release_8 Revision v8.24
class.ilADTDefinition.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
5
11abstract class ilADTDefinition
12{
13 protected bool $allow_null;
14
15 public function __construct()
16 {
17 $this->reset();
18 }
19
24 public function getType(): string
25 {
26 return substr(substr(get_class($this), 5), 0, -10);
27 }
28
32 public function reset(): void
33 {
34 $this->setAllowNull(true);
35 }
36
37
38 //
39 // null
40 //
41
46 public function setAllowNull(bool $a_value): void
47 {
48 $this->allow_null = $a_value;
49 }
50
51 public function isNullAllowed(): bool
52 {
53 return $this->allow_null;
54 }
55
56
57 //
58 // comparison
59 //
60
66 abstract public function isComparableTo(ilADT $a_adt): bool;
67}
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:12