Work out which attributes are available to a DN
This commit is contained in:
@@ -120,6 +120,8 @@ class Attribute
|
||||
public function __get(string $key): mixed
|
||||
{
|
||||
return match ($key) {
|
||||
// List all the attributes
|
||||
'attributes' => $this->attributes(),
|
||||
// Can this attribute have more values
|
||||
'can_addvalues' => $this->schema && (! $this->schema->is_single_value) && ((! $this->max_values_count) || ($this->values->count() < $this->max_values_count)),
|
||||
// Schema attribute description
|
||||
@@ -143,6 +145,11 @@ class Attribute
|
||||
};
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->__get('name');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the hints about this attribute, ie: RDN, Required, etc
|
||||
*
|
||||
|
Reference in New Issue
Block a user