AttributeList
class AttributeList extends NormalizedList
Hosts a list of attribute names. The config array it returns contains the names, deduplicated and sorted
Properties
protected array | $items | from Collection | |
protected string | $onDuplicateAction | from NormalizedCollection |
Methods
No description
Query and set the action to take when add() is called with a key that already exists
Return the exception that is thrown when creating an item using a key that already exists
Return the exception that is thrown when accessing an item that does not exist
Normalize the name of an attribute
Test whether a given value is present in this collection
Set and overwrite a value in this collection
Custom offsetSet() implementation to allow assignment with a null offset to append to the chain
Insert a value at an arbitrary 0-based position
Details
in
Collection at line 25
clear()
Empty this collection
at line 32
array|Dictionary|null
asConfig()
No description
in
Collection at line 45
int
count()
No description
in
Collection at line 57
mixed
current()
No description
in
Collection at line 66
int|string
key()
No description
in
Collection at line 75
mixed
next()
No description
in
Collection at line 84
void
rewind()
No description
in
Collection at line 92
bool
valid()
No description
in
NormalizedCollection at line 38
string
onDuplicate(string|null $action = null)
Query and set the action to take when add() is called with a key that already exists
in
NormalizedCollection at line 63
protected RuntimeException
getAlreadyExistsException(string $key)
Return the exception that is thrown when creating an item using a key that already exists
in
NormalizedCollection at line 74
protected RuntimeException
getNotExistException(string $key)
Return the exception that is thrown when accessing an item that does not exist
in
NormalizedList at line 86
string
normalizeKey(string $key)
Ensure that the key is a valid offset
Negative values count from the end of the list
at line 24
mixed
normalizeValue(string $attrName)
Normalize the name of an attribute
in
NormalizedList at line 23
mixed
add(mixed $value, null $void = null)
Add (append) a value to this list
Alias for append(). Overrides NormalizedCollection::add()
in
NormalizedCollection at line 144
bool
contains(mixed $value)
Test whether a given value is present in this collection
in
NormalizedList at line 51
void
delete(string $key)
Delete a value from this list and remove gaps in keys
NOTE: parent::offsetUnset() maps to $this->delete() so this method covers both usages
in
NormalizedCollection at line 175
bool
exists(string $key)
Test whether an item of given key exists
in
NormalizedCollection at line 195
mixed
get(string $key)
Return a value from this collection
in
NormalizedCollection at line 215
mixed
indexOf(mixed $value)
Find the index of a given value
Will return the first key associated with the given value, or FALSE if the value is not found
in
NormalizedCollection at line 227
mixed
set(string $key, mixed $value)
Set and overwrite a value in this collection
in
NormalizedCollection at line 244
bool
offsetExists(string|int $offset)
No description
in
NormalizedCollection at line 253
mixed
offsetGet(string|int $offset)
No description
in
NormalizedList at line 115
void
offsetSet(string|int $offset, mixed $value)
Custom offsetSet() implementation to allow assignment with a null offset to append to the chain
in
NormalizedCollection at line 273
void
offsetUnset(string|int $offset)
No description
in
NormalizedList at line 34
mixed
append(mixed $value)
Append a value to this list
in
NormalizedList at line 66
mixed
insert(int $offset, mixed $value)
Insert a value at an arbitrary 0-based position
in
NormalizedList at line 135
mixed
prepend(mixed $value)
Prepend a value to this list
in
NormalizedList at line 150
int
remove(mixed $value)
Remove all items matching given value