Documentation

DefaultIterator
in package
implements Iterator

Iterator for Base objects that allows relationships and decorated objects to be handled gracefully.

Tags
category

Horde

Interfaces, Classes, Traits and Enums

Iterator

Table of Contents

$_index  : mixed
Current index
$_keys  : mixed
List of keys that we'll iterator over. This is the combined list of the fields, lazyFields, relationships, and lazyRelationships properties from the objects Mapper.
$_rdo  : Base
$_valid  : bool
Are we inside the array bounds?
__construct()  : mixed
New Iterator for iterating over Rdo objects.
current()  : mixed
Return the current value.
key()  : mixed
Return the current key.
next()  : mixed
Move to the next key in the iterator.
rewind()  : mixed
Reset to the first key.
valid()  : bool
Check array bounds.

Properties

$_keys

List of keys that we'll iterator over. This is the combined list of the fields, lazyFields, relationships, and lazyRelationships properties from the objects Mapper.

private mixed $_keys = array()

$_valid

Are we inside the array bounds?

private bool $_valid = false

Methods

__construct()

New Iterator for iterating over Rdo objects.

public __construct(Base $rdo) : mixed
Parameters
$rdo : Base

The object to iterate over

Return values
mixed

current()

Return the current value.

public current() : mixed
Return values
mixed

The current value

key()

Return the current key.

public key() : mixed
Return values
mixed

The current key

next()

Move to the next key in the iterator.

public next() : mixed
Return values
mixed

rewind()

Reset to the first key.

public rewind() : mixed
Return values
mixed

valid()

Check array bounds.

public valid() : bool
Return values
bool

Inside array bounds?

Search results