Requests 2.0.0 API

FilteredIterator extends ArrayIterator
in package

Iterator for arrays requiring filtered values

Table of Contents

__construct()  : mixed
Create a new iterator
__unserialize()  : mixed
__wakeup()  : mixed
current()  : string
Get the current item's value after filtering
unserialize()  : mixed

Methods

__construct()

Create a new iterator

public __construct(array<string|int, mixed> $data, callable $callback) : mixed
Parameters
$data : array<string|int, mixed>
$callback : callable

Callback to be called on each value

Tags
throws
InvalidArgument

When the passed $data argument is not iterable.

Return values
mixed

__unserialize()

public __unserialize(mixed $data) : mixed
Parameters
$data : mixed
Tags
inheritdoc
phpcs:disable

PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound

Return values
mixed

current()

Get the current item's value after filtering

public current() : string
Return values
string

unserialize()

public unserialize(mixed $data) : mixed
Parameters
$data : mixed
Tags
inheritdoc
Return values
mixed

Search results