ArrayCollection
extends ArrayAccess
in package
implements
Countable
A generic, abstract collection class that allows collections to exhibit array functionality.
Interfaces, Classes and Traits
- Countable
Table of Contents
- $elements : array<string|int, mixed>
- __construct() : mixed
- append() : mixed
- Appends a value to the container.
- count() : int
- offsetExists() : bool
- Checks to see whether a particular offset key exists.
- offsetGet() : mixed|null
- Get the value for a particular offset key.
- offsetSet() : mixed
- Sets a value to a particular offset.
- offsetUnset() : mixed
- Unset a particular key.
- setElements() : $this
- valueExists() : bool
- Checks to see whether a particular value exists.
Properties
$elements
protected
array<string|int, mixed>
$elements
The elements being held by this iterator.
Methods
__construct()
public
__construct([array<string|int, mixed> $data = array() ]) : mixed
Parameters
- $data : array<string|int, mixed> = array()
Return values
mixed —append()
Appends a value to the container.
public
append( $value) : mixed
Parameters
Return values
mixed —count()
public
count() : int
Return values
int —offsetExists()
Checks to see whether a particular offset key exists.
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
bool —offsetGet()
Get the value for a particular offset key.
public
offsetGet(mixed $offset) : mixed|null
Parameters
- $offset : mixed
Return values
mixed|null —offsetSet()
Sets a value to a particular offset.
public
offsetSet(mixed $offset, mixed $value) : mixed
Parameters
- $offset : mixed
- $value : mixed
Return values
mixed —offsetUnset()
Unset a particular key.
public
offsetUnset(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —setElements()
public
setElements([array<string|int, mixed> $data = array() ]) : $this
Parameters
- $data : array<string|int, mixed> = array()
Return values
$this —valueExists()
Checks to see whether a particular value exists.
public
valueExists( $value) : bool