35 self::FIELD_TYPE_TEXT => [
40 self::FIELD_TYPE_INTEGER => [
52 protected static array
$date_fields = [self::FIELD_TYPE_DATE, self::FIELD_TYPE_TIME, self::FIELD_TYPE_TIMESTAMP];
57 foreach ($array as $key => $value) {
58 $this->{$key} = match ($value) {
68 $array = (array) $stdClass;
79 if (isset($this->{$field_name}) && $this->{$field_name} && self::isAllowedAttribute(
97 if ($this->{$field_name} && self::isAllowedAttribute($this->
getFieldType(), $field_name)) {
121 $this->fieldtype = $field_type;
161 $this->not_null = $not_null;
166 return $this->not_null;
171 $this->is_primary = $primary;
207 return in_array($field_name, self::$allowed_attributes[$type],
true);
212 return in_array($field_type, self::$date_fields,
true);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static mapKey(string $key)
setFieldType(string $field_type)
loadFromStdClass(string $name, stdClass $stdClass)
static getAllowedConnectorFields()
static array $date_fields
static array $allowed_attributes
setHasField(bool $has_field)
setPrimary(bool $primary)
loadFromArray(string $name, array $array)
const FIELD_TYPE_TIMESTAMP
setNotNull(bool $not_null)
static isAllowedAttribute(string $type, string $field_name)
static getAllowedDescriptionFields()
setSequence(bool $sequence)
getAttributesForConnector()
getAttributesForDescription()
static isDateFieldType($field_type)