Array collection
Provides a wrapper around a standard PHP array.
- internal
- phpstan-template T
- phpstan-implements \IteratorAggregate<int, T>
- phpstan-implements \ArrayAccess<int, T>
CloneableFinalInstantiableIterable
- Implements
ArrayAccess Countable IteratorAggregate Traversable
Methods |
public __construct(array $elements = []) Constructor
|
public count() : int Count elements of an object
|
public first()
|
public getIterator() : ArrayIterator Retrieve an external iterator
|
public last()
|
public offsetExists( $offset) : bool Whether an offset exists
|
public offsetGet( $offset) Offset to retrieve
|
public offsetSet( $offset, $value) : void Offset to set
|
public offsetUnset( $offset) : void Offset to unset
|
public slice(int $offset, ?int $length = NULL) : array Returns a subset of the array
|
public toArray() : array
|
Properties |
private array $elements
|