Documentation

CallbackGenerator
in package
implements Iterator

Class \Hoa\Iterator\CallbackGenerator.

Yield a value based on a callback.

Tags
copyright

Copyright © 2007-2017 Hoa community

license

New BSD License

Table of Contents

Interfaces

Iterator
Interface \Hoa\Iterator.

Properties

$_callback  : callable
Callback.
$_current  : mixed
Current computed value.
$_key  : mixed
Current key.

Methods

__construct()  : mixed
Constructor.
current()  : mixed
Return the current element.
key()  : mixed
Return the key of the current element.
next()  : void
Move forward to next element.
rewind()  : void
Rewind the iterator to the first element.
valid()  : bool
Check if current position is valid.

Properties

Methods

__construct()

Constructor.

public __construct(callable $callback) : mixed
Parameters
$callback : callable

Callback.

valid()

Check if current position is valid.

public valid() : bool
Return values
bool

        
On this page

Search results