HumHub Documentation (unofficial)

SessionIterator
in package
implements Iterator

SessionIterator implements an [[\Iterator|iterator]] for traversing session variables managed by [[Session]].

Tags
author

Qiang Xue qiang.xue@gmail.com

since
2.0

Table of Contents

Interfaces

Iterator

Properties

$_key  : string|int|false
$_keys  : array<string|int, mixed>

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

$_keys

private array<string|int, mixed> $_keys

list of keys in the map

Methods

current()

Returns the current array element.

public current() : mixed

This method is required by the interface [[\Iterator]].

Attributes
#[ReturnTypeWillChange]
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
#[ReturnTypeWillChange]
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
#[ReturnTypeWillChange]

valid()

Returns whether there is an element at current position.

public valid() : bool

This method is required by the interface [[\Iterator]].

Attributes
#[ReturnTypeWillChange]
Return values
bool

        
On this page

Search results