AbstractCollection
abstract class AbstractCollection implements Iterator, Countable
Class AbstractCollection
Properties
protected array | $items | ||
protected int | $index |
Methods
AbstractCollection constructor.
No description
No description
No description
No description
No description
No description
Return the current position of the index
Move index to first position and return current element
No description
Move the index at the specified position
No description
No description
Move index at the end of collection and return current element
No description
Move index to next position and return current element
Return current key/index
Return current key/index
Move index to first position and return current element
Details
at line 35
__construct(array|null $items = [])
AbstractCollection constructor.
at line 46
protected AbstractCollection
setItems(array|null $items = [])
at line 63
AbstractCollection
addItem($item)
at line 77
protected mixed
parseItem($item)
at line 86
string
toJson()
at line 95
array
toArray()
at line 104
string
__toString()
at line 115
int
position()
Return the current position of the index
at line 126
mixed|null
first()
Move index to first position and return current element
at line 137
mixed|null
get(int $index)
at line 150
mixed|null
seek(int|null $index = 0)
Move the index at the specified position
at line 161
int
count()
at line 170
int
getLastIndex()
at line 183
mixed|null
last()
Move index at the end of collection and return current element
at line 193
mixed|null
current()
at line 204
mixed|null
next()
Move index to next position and return current element
at line 215
mixed|null
key()
Return current key/index
at line 226
mixed|null
valid()
Return current key/index
at line 237
mixed|null
rewind()
Move index to first position and return current element