ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilADTBoolean Class Reference
+ Inheritance diagram for ilADTBoolean:
+ Collaboration diagram for ilADTBoolean:

Public Member Functions

 reset ()
 
 setStatus (?bool $a_value=null)
 
 getStatus ()
 
 equals (ilADT $a_adt)
 
 isLarger (ilADT $a_adt)
 
 isSmaller (ilADT $a_adt)
 
 isNull ()
 
 isValid ()
 
 getCheckSum ()
 
 exportStdClass ()
 
 importStdClass (?stdClass $a_std)
 
- Public Member Functions inherited from ilADT
 __construct (ilADTDefinition $a_def)
 
 getType ()
 Get type (from class/instance) More...
 
 reset ()
 Init property defaults. More...
 
 getCopyOfDefinition ()
 Get copy of definition. More...
 
 equals (ilADT $a_adt)
 Check if given ADT equals self. More...
 
 isLarger (ilADT $a_adt)
 Check if given ADT is larger than self. More...
 
 isLargerOrEqual (ilADT $a_adt)
 
 isSmaller (ilADT $a_adt)
 Check if given ADT is smaller than self. More...
 
 isSmallerOrEqual (ilADT $a_adt)
 Check if given ADT is smaller or equal than self. More...
 
 isInbetween (ilADT $a_adt_from, ilADT $a_adt_to)
 Check if self is inbetween given ADTs (exclusive) More...
 
 isInbetweenOrEqual (ilADT $a_adt_from, ilADT $a_adt_to)
 Check if self is inbetween given ADTs (inclusive) More...
 
 isNull ()
 Is currently null. More...
 
 isValid ()
 
 getValidationErrors ()
 Get all validation error codes. More...
 
 translateErrorCode (string $a_code)
 Translate error-code to human-readable message. More...
 
 getCheckSum ()
 Get unique checksum. More...
 
 exportStdClass ()
 Export value as stdClass. More...
 
 importStdClass (?stdClass $a_std)
 Import value from stdClass. More...
 

Protected Member Functions

 isValidDefinition (ilADTDefinition $a_def)
 
- Protected Member Functions inherited from ilADT
 isValidDefinition (ilADTDefinition $a_def)
 Check if definition is valid for ADT. More...
 
 setDefinition (ilADTDefinition $a_def)
 Set definition. More...
 
 getDefinition ()
 Get definition. More...
 
 addValidationError (string $a_error_code)
 

Protected Attributes

bool $value
 
- Protected Attributes inherited from ilADT
ilADTDefinition $definition
 
ilLanguage $lng
 
array $validation_errors = []
 

Additional Inherited Members

- Data Fields inherited from ilADT
const ADT_VALIDATION_ERROR_NULL_NOT_ALLOWED = "adt1"
 
const ADT_VALIDATION_ERROR_MAX_LENGTH = "adt2"
 
const ADT_VALIDATION_ERROR_MAX_SIZE = "adt3"
 
const ADT_VALIDATION_ERROR_MIN = "adt4"
 
const ADT_VALIDATION_ERROR_MAX = "adt5"
 
const ADT_VALIDATION_DATE = "adt6"
 
const ADT_VALIDATION_ERROR_INVALID_NODE = 'adt7'
 

Detailed Description

Definition at line 21 of file class.ilADTBoolean.php.

Member Function Documentation

◆ equals()

ilADTBoolean::equals ( ilADT  $a_adt)

Definition at line 52 of file class.ilADTBoolean.php.

References ilADT\getDefinition(), getStatus(), and null.

52  : ?bool
53  {
54  if ($this->getDefinition()->isComparableTo($a_adt)) {
55  return ($this->getStatus() === $a_adt->getStatus());
56  }
57  return null;
58  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getDefinition()
Get definition.
+ Here is the call graph for this function:

◆ exportStdClass()

ilADTBoolean::exportStdClass ( )

Definition at line 94 of file class.ilADTBoolean.php.

References getStatus(), isNull(), and null.

94  : ?stdClass
95  {
96  if (!$this->isNull()) {
97  $obj = new stdClass();
98  $obj->value = $this->getStatus();
99  return $obj;
100  }
101  return null;
102  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getCheckSum()

ilADTBoolean::getCheckSum ( )

Definition at line 84 of file class.ilADTBoolean.php.

References getStatus(), isNull(), and null.

84  : ?string
85  {
86  if (!$this->isNull()) {
87  return (string) $this->getStatus();
88  }
89  return null;
90  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getStatus()

ilADTBoolean::getStatus ( )

Definition at line 45 of file class.ilADTBoolean.php.

References $value.

Referenced by equals(), exportStdClass(), getCheckSum(), and isNull().

45  : ?bool
46  {
47  return $this->value;
48  }
+ Here is the caller graph for this function:

◆ importStdClass()

ilADTBoolean::importStdClass ( ?stdClass  $a_std)

Definition at line 104 of file class.ilADTBoolean.php.

References setStatus().

104  : void
105  {
106  if (is_object($a_std)) {
107  $this->setStatus((bool) $a_std->value);
108  }
109  }
setStatus(?bool $a_value=null)
+ Here is the call graph for this function:

◆ isLarger()

ilADTBoolean::isLarger ( ilADT  $a_adt)

Definition at line 60 of file class.ilADTBoolean.php.

References null.

60  : ?bool
61  {
62  return null;
63  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ isNull()

ilADTBoolean::isNull ( )

Definition at line 72 of file class.ilADTBoolean.php.

References getStatus(), and null.

Referenced by exportStdClass(), and getCheckSum().

72  : bool
73  {
74  return $this->getStatus() === null;
75  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSmaller()

ilADTBoolean::isSmaller ( ilADT  $a_adt)

Definition at line 65 of file class.ilADTBoolean.php.

References null.

65  : ?bool
66  {
67  return null;
68  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ isValid()

ilADTBoolean::isValid ( )

Definition at line 77 of file class.ilADTBoolean.php.

77  : bool
78  {
79  return true;
80  }

◆ isValidDefinition()

ilADTBoolean::isValidDefinition ( ilADTDefinition  $a_def)
protected

Definition at line 27 of file class.ilADTBoolean.php.

27  : bool
28  {
29  return ($a_def instanceof ilADTBooleanDefinition);
30  }
Class ilADTBooleanDefinition.

◆ reset()

ilADTBoolean::reset ( )

Definition at line 32 of file class.ilADTBoolean.php.

References null.

32  : void
33  {
34  parent::reset();
35  $this->value = null;
36  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ setStatus()

ilADTBoolean::setStatus ( ?bool  $a_value = null)

Definition at line 40 of file class.ilADTBoolean.php.

Referenced by importStdClass().

40  : void
41  {
42  $this->value = $a_value;
43  }
+ Here is the caller graph for this function:

Field Documentation

◆ $value

bool ilADTBoolean::$value
protected

Definition at line 23 of file class.ilADTBoolean.php.

Referenced by getStatus().


The documentation for this class was generated from the following file: