Class KeyListIterator

Summary

Fully Qualified Name: Zend\Cache\Storage\Adapter\KeyListIterator
Implements: IteratorInterface, Countable

Description

Methods

Name Description Defined By
__construct() Constructor KeyListIterator
count() Count number of items KeyListIterator
current() Get current key, value or metadata. KeyListIterator
getMode() Get iterator mode KeyListIterator
getStorage() Get storage instance KeyListIterator
key() Get current key KeyListIterator
next() Move forward to next element KeyListIterator
rewind() Rewind the Iterator to the first element. KeyListIterator
setMode() Set iterator mode KeyListIterator
valid() Checks if current position is valid KeyListIterator

Method Details

__construct()

Constructor

Parameter Name Type Description
$storage \StorageInterface
$keys array

Returns:

count()

Count number of items

Returns: int

current()

Get current key, value or metadata.

Returns: mixed

getMode()

Get iterator mode

Returns: int Value of IteratorInterface::CURRENT_AS_*

getStorage()

Get storage instance

Returns: \StorageInterface

key()

Get current key

Returns: string

next()

Move forward to next element

Returns: void

rewind()

Rewind the Iterator to the first element.

Returns: void

setMode()

Set iterator mode

Parameter Name Type Description
$mode int

Returns: \KeyListIterator Provides a fluent interface

valid()

Checks if current position is valid

Returns: bool

Top