\Swoole\ConnectionIterator

Summary

Methods
Properties
Constants
current()
next()
key()
valid()
rewind()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
count()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

current()

current() : mixed

Return the current element

Returns

mixed —

Can return any type.

next()

next() : void

Move forward to next element

key()

key() : mixed

Return the key of the current element

Returns

mixed —

scalar on success, or null on failure.

valid()

valid() : boolean

Checks if current position is valid

Returns

boolean —

The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.

rewind()

rewind() : void

Rewind the Iterator to the first element

offsetExists()

offsetExists(mixed  $offset) : boolean

Whether a offset exists

Parameters

mixed $offset

An offset to check for.

Returns

boolean —

true on success or false on failure.

The return value will be casted to boolean if non-boolean was returned.

offsetGet()

offsetGet(mixed  $offset) : mixed

Offset to retrieve

Parameters

mixed $offset

The offset to retrieve.

Returns

mixed —

Can return all value types.

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : void

Offset to set

Parameters

mixed $offset

The offset to assign the value to.

mixed $value

The value to set.

offsetUnset()

offsetUnset(mixed  $offset) : void

Offset to unset

Parameters

mixed $offset

The offset to unset.

count()

count() : integer

Count elements of an object

Returns

integer —

The custom count as an integer.

The return value is cast to an integer.