LanguageCollection
extends KeyValueCollection
in package
Class LanguageCollection
Table of Contents
- $collectionContentArray : array<string|int, mixed>
- Content Collection
- __construct() : mixed
- Class Constructor
- add() : mixed
- Add a new module center module into the collection.
- count() : int
- Get collection item count.
- getArray() : array<string|int, mixed>
- Get the collection as an array.
- getItem() : mixed
- Get specific collection item by index.
- getIterator() : Traversable
- getValue() : mixed
- Get the value that corresponds to the provided key.
- isEmpty() : bool
- Determine whether the collection is empty or not.
- keyExists() : bool
- Check if a given key exists within the collection.
- _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 item 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()
Class Constructor
public
__construct([array<string|int, mixed> $languages = [] ]) : mixed
Parameters
- $languages : array<string|int, mixed> = []
Return values
mixed —add()
Add a new module center module into the collection.
public
add(Language $language) : mixed
Parameters
- $language : Language
Return values
mixed —count()
Get collection item count.
public
count() : int
Return values
int —getArray()
Get the collection as an array.
public
getArray() : array<string|int, mixed>
Return values
array<string|int, 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()
Get the value that corresponds to the provided key.
public
getValue(string $p_keyName) : mixed
Parameters
- $p_keyName : string
Tags
Return values
mixed —isEmpty()
Determine whether the collection is empty or not.
public
isEmpty() : bool
Return values
bool —keyExists()
Check if a given key exists within the collection.
public
keyExists(string $p_keyName) : bool
Parameters
- $p_keyName : string
Return values
bool —_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 item type.
protected
_getValidType() : string
Return values
string —_itemIsValid()
Check if a new item has the valid collection type.
protected
_itemIsValid(mixed $dataItem) : bool
Parameters
- $dataItem : mixed