ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilADTTextDefinition.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected ?int $max_length = null;
24
25 // properties
26
27 public function getMaxLength(): ?int
28 {
29 return $this->max_length;
30 }
31
32 public function setMaxLength(?int $a_value): void
33 {
34 $a_value = (int) $a_value;
35 if ($a_value < 1) {
36 $a_value = null;
37 }
38 $this->max_length = $a_value;
39 }
40
41 // comparison
42
43 public function isComparableTo(ilADT $a_adt): bool
44 {
45 // has to be text-based
46 return ($a_adt instanceof ilADTText);
47 }
48}
ADT definition base class.
isComparableTo(ilADT $a_adt)
Check if given ADT is comparable to self.
ADT base class.
Definition: class.ilADT.php:26