ContactCollection
extends AbstractCollection
in package
implements
ContactCollectionInterface
Class ContactCollection
Handles collection of EmailContact objects.
Tags
Interfaces, Classes and Traits
- ContactCollectionInterface
- Interface ContactCollectionInterface
Table of Contents
- $collectionContentArray : array<string|int, mixed>
- Content Collection
- __construct() : mixed
- Initialize the collection instance.
- add() : mixed
- Adds a new contact into the collection.
- clear() : mixed
- Removes all contacts of 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
- isEmpty() : bool
- Determine whether the collection is empty or not.
- remove() : mixed
- Removes a contact from collection.
- _add() : mixed
- Add a new item.
- _getExceptionText() : string
- Get exception text.
- _getValidType() : string
- Returns the type of the collection items.
- _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 —add()
Adds a new contact into the collection.
public
add(EmailContactInterface $contact) : mixed
Parameters
- $contact : EmailContactInterface
-
E-Mail contact.
Return values
mixed —clear()
Removes all contacts of collection.
public
clear() : mixed
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 —isEmpty()
Determine whether the collection is empty or not.
public
isEmpty() : bool
Return values
bool —remove()
Removes a contact from collection.
public
remove(EmailContactInterface $contact) : mixed
Parameters
- $contact : EmailContactInterface
-
E-Mail contact.
Tags
Return values
mixed —_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 —_getExceptionText()
Get exception text.
protected
_getExceptionText() : string
Return values
string —_getValidType()
Returns the type of the collection items.
protected
_getValidType() : string
Return values
string —Valid type.
_itemIsValid()
Check if a new item has the valid collection type.
protected
_itemIsValid(mixed $dataItem) : bool
Parameters
- $dataItem : mixed