Internal attributes are now handled by the new backend setup for attribute tags

This commit is contained in:
2025-03-16 13:58:13 +11:00
parent 85c7132b30
commit 1470170928
8 changed files with 66 additions and 5 deletions

View File

@@ -36,7 +36,7 @@ class Attribute implements \Countable, \ArrayAccess, \Iterator
// The old values for this attribute - helps with isDirty() to determine if there is an update pending
protected(set) Collection $values_old;
// Current Values
public Collection $values;
protected Collection $values;
// The objectclasses of the entry that has this attribute
protected(set) Collection $oc;
@@ -152,11 +152,26 @@ class Attribute implements \Countable, \ArrayAccess, \Iterator
'required_by' => $this->schema?->required_by_object_classes ?: collect(),
// Used in Object Classes
'used_in' => $this->schema?->used_in_object_classes ?: collect(),
// The current attribute values
'values' => $this->values,
default => throw new \Exception('Unknown key:' . $key),
};
}
public function __set(string $key,mixed $values)
{
switch ($key) {
case 'values':
if (is_null($values)) throw new \Exception('values is null?');
$this->values = $values;
break;
default:
throw new \Exception('Unknown key:'.$key);
}
}
public function __toString(): string
{
return $this->name;