Lookbehind
extends IteratorIterator
in package
implements
Outer
Class \Hoa\Iterator\Lookbehind.
Look behind iterator.
Tags
Table of Contents
Interfaces
- Outer
- Interface \Hoa\Iterator\Outer.
Properties
- $_iterator : Iterator
- Current iterator.
- $_previousCurrent : mixed
- Previous value.
- $_previousKey : mixed
- Previous key.
Methods
- __construct() : mixed
- Construct.
- current() : mixed
- Return the current element.
- getInnerIterator() : Iterator
- Get inner iterator.
- getPrevious() : mixed
- Get previous value.
- getPreviousKey() : mixed
- Get previous key.
- hasPrevious() : bool
- Check whether there is a previous 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
$_iterator
Current iterator.
protected
Iterator
$_iterator
= null
$_previousCurrent
Previous value.
protected
mixed
$_previousCurrent
= null
$_previousKey
Previous key.
protected
mixed
$_previousKey
= -1
Methods
__construct()
Construct.
public
__construct(Iterator $iterator) : mixed
Parameters
- $iterator : Iterator
-
Iterator.
current()
Return the current element.
public
current() : mixed
getInnerIterator()
Get inner iterator.
public
getInnerIterator() : Iterator
Return values
IteratorgetPrevious()
Get previous value.
public
getPrevious() : mixed
getPreviousKey()
Get previous key.
public
getPreviousKey() : mixed
hasPrevious()
Check whether there is a previous element.
public
hasPrevious() : bool
Return values
boolkey()
Return the key of the current element.
public
key() : mixed
next()
Move forward to next element.
public
next() : void
rewind()
Rewind the iterator to the first element.
public
rewind() : void
valid()
Check if current position is valid.
public
valid() : bool