phpDocumentor

FieldSetCollection extends EditableCollection implements JsonSerializable Uses CollectionTrait

Class FieldSetCollection

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()  : $this
Adds a new item to the collection.
count()  : int
Get collection item count.
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
isEmpty()  : bool
Determine whether the collection is empty or not.
jsonSerialize()  : mixed
Specify data which should be serialized to JSON
setItem()  : $this
Sets an item to the collection.
_add()  : mixed
Add a new item.
_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
throws
InvalidArgumentException
Return values
mixed

addCollection()

Add another collection to this one.

public addCollection(EditableCollection $collection) : $this
Parameters
$collection : EditableCollection

Collection to add.

Tags
throws
InvalidArgumentException

When the item types of the passed collection are invalid.

Return values
$this

Same instance to make chained method calls possible.

addItem()

Adds a new item to the collection.

public addItem(mixed $value) : $this
Parameters
$value : mixed
Tags
throws
InvalidArgumentException

When value has an invalid type.

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
$p_index :
Tags
throws
InvalidArgumentException

if index is not numeric | OutOfBoundsException if index is out of bounds

Return values
mixed

isEmpty()

Determine whether the collection is empty or not.

public isEmpty() : bool
Return values
bool

setItem()

Sets an item to the collection.

public setItem(int|IntType $index, mixed $value) : $this

If the index already exists, the value gets override.

Parameters
$index : int|IntType

Gets validate internally with the IntType.

$value : mixed
Tags
throws
InvalidArgumentException

When value has an invalid type.

Return values
$this

Same instance to make chained method calls possible.

_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
throws
InvalidArgumentException

When $item has an invalid type.

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
Return values
bool

Search results