Zend\Cache\Storage\Adapter\KeyListIterator
Synopsis
class KeyListIterator
implements
IteratorInterface,Countable
{
- // members
- protected StorageInterface $storage;
- protected int $mode;
- protected array $keys;
- protected int $count;
- protected integer $position;
- // methods
- public void __construct()
- public StorageInterface getStorage()
- public int getMode()
- public KeyListIterator setMode()
- public mixed current()
- public string key()
- public bool valid()
- public void next()
- public void rewind()
- public int count()
Hierarchy
Implements
Constants
Name | Value |
---|---|
CURRENT_AS_SELF | 0 |
CURRENT_AS_KEY | 1 |
CURRENT_AS_VALUE | 2 |
CURRENT_AS_METADATA | 3 |
Members
protected
- $count
—
int
Number of keys - $keys
—
array
Keys to iterate over - $mode
—
int
The iterator mode - $position
—
int
Current iterator position - $storage
—
Zend\Cache\Storage\StorageInterface
The storage instance
Methods
public
- __construct() — Constructor
- count() — Count number of items
- current() — Get current key, value or metadata.
- getMode() — Get iterator mode
- getStorage() — Get storage instance
- key() — Get current key
- next() — Move forward to next element
- rewind() — Rewind the Iterator to the first element.
- setMode() — Set iterator mode
- valid() — Checks if current position is valid