Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
DbaIterator Class Reference

Public Member Functions

 __construct (Dba $storage, $handle, $prefix)
 Constructor.
 
 getStorage ()
 Get storage instance.
 
 getMode ()
 Get iterator mode.
 
 setMode ($mode)
 Set iterator mode.
 
 current ()
 Get current key, value or metadata.
 
 key ()
 Get current key.
 
 next ()
 Move forward to next element.
 
 valid ()
 Checks if current position is valid.
 
 rewind ()
 Rewind the Iterator to the first element.
 

Protected Attributes

 $storage
 
 $mode = IteratorInterface::CURRENT_AS_KEY
 
 $handle
 
 $prefixLength
 
 $currentInternalKey
 

Additional Inherited Members

- Public Attributes inherited from IteratorInterface
const CURRENT_AS_SELF = 0
 
const CURRENT_AS_KEY = 1
 
const CURRENT_AS_VALUE = 2
 
const CURRENT_AS_METADATA = 3
 

Constructor & Destructor Documentation

__construct ( Dba  $storage,
  $handle,
  $prefix 
)

Constructor.

Parameters
Dba$storage
resource$handle
string$prefix

Member Function Documentation

current ( )

Get current key, value or metadata.

Returns
mixed
Exceptions
Exception\RuntimeException
getMode ( )

Get iterator mode.

Returns
int Value of IteratorInterface::CURRENT_AS_*

Implements IteratorInterface.

getStorage ( )

Get storage instance.

Returns
Dba

Implements IteratorInterface.

key ( )

Get current key.

Returns
string
Exceptions
Exception\RuntimeException
next ( )

Move forward to next element.

Returns
void
Exceptions
Exception\RuntimeException
rewind ( )

Rewind the Iterator to the first element.

Returns
void
Exceptions
Exception\RuntimeException
setMode (   $mode)

Set iterator mode.

Parameters
int$mode
Returns
ApcIterator Fluent interface

Implements IteratorInterface.

valid ( )

Checks if current position is valid.

Returns
bool

Member Data Documentation

$currentInternalKey
protected
$handle
protected
$prefixLength
protected
$storage
protected