Documentation

Collection
in package
implements IteratorAggregate

Tags
template

T

Interfaces, Classes, Traits and Enums

IteratorAggregate

Table of Contents

$elements  : array<string|int, T>
__construct()  : mixed
count()  : int
getIterator()  : Traversable<string|int, T>
toArray()  : array<string|int, T>
isValidElement()  : bool
sortElements()  : array<string|int, T>

Properties

$elements

private array<string|int, T> $elements

Methods

__construct()

public __construct([array<string|int, T$elements = [] ]) : mixed
Parameters
$elements : array<string|int, T> = []
Return values
mixed

count()

public count() : int
Return values
int

getIterator()

public getIterator() : Traversable<string|int, T>
Return values
Traversable<string|int, T>

toArray()

public toArray() : array<string|int, T>
Return values
array<string|int, T>

isValidElement()

protected abstract isValidElement(mixed $element) : bool
Parameters
$element : mixed
Return values
bool

sortElements()

protected sortElements(array<string|int, T$elements) : array<string|int, T>
Parameters
$elements : array<string|int, T>
Return values
array<string|int, T>

Search results