Inheritance | yii\web\SessionIterator |
---|---|
Implements | Iterator |
Available since version | 2.0 |
Source Code | https://github.com/yiisoft/yii2/blob/master/framework/web/SessionIterator.php |
SessionIterator implements an iterator for traversing session variables managed by yii\web\Session.
Method | Description | Defined By |
---|---|---|
__construct() | Constructor. | yii\web\SessionIterator |
current() | Returns the current array element. | yii\web\SessionIterator |
key() | Returns the key of the current array element. | yii\web\SessionIterator |
next() | Moves the internal pointer to the next array element. | yii\web\SessionIterator |
rewind() | Rewinds internal array pointer. | yii\web\SessionIterator |
valid() | Returns whether there is an element at current position. | yii\web\SessionIterator |
Constructor.
public void __construct ( ) |
---|
Returns the current array element.
This method is required by the interface Iterator.
public mixed current ( ) | ||
---|---|---|
return | mixed |
The current array element |
Returns the key of the current array element.
This method is required by the interface Iterator.
public mixed key ( ) | ||
---|---|---|
return | mixed |
The key of the current array element |
Moves the internal pointer to the next array element.
This method is required by the interface Iterator.
public void next ( ) |
---|
Rewinds internal array pointer.
This method is required by the interface Iterator.
public void rewind ( ) |
---|
Returns whether there is an element at current position.
This method is required by the interface Iterator.
public boolean valid ( ) |
---|
© 2008–2017 by Yii Software LLC
Licensed under the three clause BSD license.
http://www.yiiframework.com/doc-2.0/yii-web-sessioniterator.html