ConfigurationCollection
extends EditableKeyValueCollection
in package
implements
JsonSerializable
Class ThemeConfigurationCollection
Interfaces, Classes and Traits
- JsonSerializable
Table of Contents
- $collectionContentArray : array<string|int, mixed>
- Content Collection
- __construct() : mixed
- Initialize the collection instance.
- addCollection() : $this
- Add another collection to this one.
- addItem() : ConfigurationCollection
- count() : int
- Get collection item count.
- createFromJsonList() : ConfigurationCollection
- deleteValue() : $this
- Deletes an value from the collection by the given key.
- getArray() : array<string|int, mixed>
- Get the collection as an array.
- getClone() : mixed
- Return a clone of the current editable key value collection instance.
- getItem() : mixed
- Get specific collection item by index.
- getIterator() : Traversable
- getValue() : Configuration
- isEmpty() : bool
- Determine whether the collection is empty or not.
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON
- keyExists() : bool
- Check if a given key exists within the collection.
- setValue() : mixed
- Set new key-value pair.
- sort() : void
- sort the collection by key name
- _add() : mixed
- Add a new item.
- _addToCollectionContentArray() : mixed
- Add the passed key value array to the collection content array.
- _getExceptionText() : string
- Get exception text.
- _getValidType() : string
- Get valid type.
- _itemIsValid() : bool
- Check if a new item has the valid collection type.
Properties
$collectionContentArray
Content Collection
protected
array<string|int, mixed>
$collectionContentArray
= []
Methods
__construct()
Initialize the collection instance.
public
__construct([array<string|int, mixed>|mixed|null $argumentsArray = null ]) : mixed
Parameters
- $argumentsArray : array<string|int, mixed>|mixed|null = null
Tags
Return values
mixed —addCollection()
Add another collection to this one.
public
addCollection(KeyValueCollection $collection) : $this
Parameters
- $collection : KeyValueCollection
-
Collection to add.
Return values
$this —Same instance to make chained method calls possible.
addItem()
public
addItem(mixed $value) : ConfigurationCollection
Parameters
- $value : mixed
Return values
ConfigurationCollection —count()
Get collection item count.
public
count() : int
Return values
int —createFromJsonList()
public
static createFromJsonList( $jsonConfigurationList) : ConfigurationCollection
Parameters
Tags
Return values
ConfigurationCollection —deleteValue()
Deletes an value from the collection by the given key.
public
deleteValue(string $p_key) : $this
Parameters
- $p_key : string
-
Key of the value that should gets delete.
Return values
$this —Same instance to make chained method calls possible.
getArray()
Get the collection as an array.
public
getArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —getClone()
Return a clone of the current editable key value collection instance.
public
getClone() : mixed
Return values
mixed —getItem()
Get specific collection item by index.
public
getItem( $p_index) : mixed
Parameters
Tags
Return values
mixed —getIterator()
public
getIterator() : Traversable
Return values
Traversable —getValue()
public
getValue(string $p_keyName) : Configuration
Parameters
- $p_keyName : string
Return values
Configuration —isEmpty()
Determine whether the collection is empty or not.
public
isEmpty() : bool
Return values
bool —jsonSerialize()
Specify data which should be serialized to JSON
public
jsonSerialize() : mixed
Tags
Return values
mixed —data which can be serialized by json_encode, which is a value of any type other than a resource.
keyExists()
Check if a given key exists within the collection.
public
keyExists(string $p_keyName) : bool
Parameters
- $p_keyName : string
Return values
bool —setValue()
Set new key-value pair.
public
setValue(string $p_keyName, mixed $p_value) : mixed
Parameters
- $p_keyName : string
- $p_value : mixed
Return values
mixed —sort()
sort the collection by key name
public
sort() : void
Return values
void —_add()
Add a new item.
protected
_add(mixed $item) : mixed
This method must be used by child-collection classes.
Parameters
- $item : mixed
-
Item which should add to the collection
Tags
Return values
mixed —_addToCollectionContentArray()
Add the passed key value array to the collection content array.
protected
_addToCollectionContentArray(array<string|int, mixed> $keyValueArray) : mixed
Parameters
- $keyValueArray : array<string|int, mixed>
Return values
mixed —_getExceptionText()
Get exception text.
protected
_getExceptionText() : string
Return values
string —_getValidType()
Get valid type.
protected
_getValidType() : string
This method must be implemented in the child-collection classes.
Return values
string —_itemIsValid()
Check if a new item has the valid collection type.
protected
_itemIsValid(mixed $dataItem) : bool
Parameters
- $dataItem : mixed