SessionIterator
in package
implements
Iterator
SessionIterator implements an [[\Iterator|iterator]] for traversing session variables managed by [[Session]].
Tags
Table of Contents
Interfaces
- Iterator
Properties
Methods
- __construct() : mixed
- Constructor.
- current() : mixed
- Returns the current array element.
- key() : string|int|null
- Returns the key of the current array element.
- next() : mixed
- Moves the internal pointer to the next array element.
- rewind() : mixed
- Rewinds internal array pointer.
- valid() : bool
- Returns whether there is an element at current position.
Properties
$_key
private
string|int|false
$_key
current key
$_keys
private
array<string|int, mixed>
$_keys
list of keys in the map
Methods
__construct()
Constructor.
public
__construct() : mixed
current()
Returns the current array element.
public
current() : mixed
This method is required by the interface [[\Iterator]].
Attributes
Return values
mixed —the current array element
key()
Returns the key of the current array element.
public
key() : string|int|null
This method is required by the interface [[\Iterator]].
Attributes
Return values
string|int|null —the key of the current array element
next()
Moves the internal pointer to the next array element.
public
next() : mixed
This method is required by the interface [[\Iterator]].
Attributes
rewind()
Rewinds internal array pointer.
public
rewind() : mixed
This method is required by the interface [[\Iterator]].
Attributes
valid()
Returns whether there is an element at current position.
public
valid() : bool
This method is required by the interface [[\Iterator]].