Methods
Return last element in the stack
bottom() : mixed
Countable: return count of items in the stack
count() : integer
Iterator: return current item in the stack
current() : mixed
Get iteration mode
getIteratorMode() : integer
Is the stack empty?
isEmpty() : boolean
Iterator: return key of current item in the stack
key() : mixed
Iterator: advance pointer to next item in the stack
next() : void
ArrayAccess: does an item exist at the specified offset?
offsetExists(mixed $index) : boolean
Parameters
$index
mixed
Returns
boolean
ArrayAccess: get the item at the specified offset
offsetGet(mixed $index) : mixed
Parameters
$index
mixed
Exceptions
Returns
mixed
ArrayAccess: add an item at the specified offset
offsetSet(mixed $index, mixed $newval) : void
Parameters
$index
mixed
$newval
mixed
ArrayAccess: unset the item at the specified offset
offsetUnset(mixed $index) : void
Parameters
$index
mixed
Exceptions
Pop a node from the end of the stack
pop() : mixed
Move the iterator to the previous node
prev() : void
todo |
Does this need to be implemented? |
Push an element to the list
push(mixed $value) : void
Iterator: rewind to beginning of stack
rewind() : void
Serialize the storage
serialize() : string
Set the iterator mode
setIteratorMode(integer $mode) : void
Must be set to one of IT_MODE_DELETE or IT_MODE_KEEP
todo |
Currently, IteratorMode is ignored, as we use the default (keep); should this be implemented? |
Parameters
$mode
integer
Exceptions
\InvalidArgumentException |
|
Shifts a node from the beginning of the list
shift() : mixed
Peek at the top node of the stack
top() : mixed
Unserialize the storage
unserialize($serialized) : void
Unshift a node onto the beginning of the list
unshift(mixed $value) : void
Iterator: is the current pointer valid?
valid() : boolean
Properties
Count of elements in the stack
$count : integer
Data represented by this stack
$data : array
Mode used when iterating
$mode : integer
Default
self::IT_MODE_KEEP
Sorted stack of values
$stack : false | array
Constants
Delete items during iteration
IT_MODE_DELETE = 1
Keep items during iteration
IT_MODE_KEEP = 0