FilesystemIterator
in package
implements
IteratorInterface
Interfaces, Classes, Traits and Enums
Table of Contents
- $globIterator : GlobIterator
- The GlobIterator instance
- $mode : int
- The iterator mode
- $prefix : string
- The namespace sprefix
- $prefixLength : int
- String length of namespace prefix
- $storage : Filesystem
- The Filesystem storage instance
- __construct() : mixed
- Constructor
- current() : mixed
- Get current key, value or metadata.
- getMode() : int
- Get iterator mode
- getStorage() : Filesystem
- Get storage instance
- key() : string
- Get current key
- next() : void
- Move forward to next element
- rewind() : bool
- Rewind the Iterator to the first element.
- setMode() : FilesystemIterator
- Set iterator mode
- valid() : bool
- Checks if current position is valid
Properties
$globIterator
The GlobIterator instance
protected
GlobIterator
$globIterator
$mode
The iterator mode
protected
int
$mode
= \Zend\Cache\Storage\IteratorInterface::CURRENT_AS_KEY
$prefix
The namespace sprefix
protected
string
$prefix
$prefixLength
String length of namespace prefix
protected
int
$prefixLength
$storage
The Filesystem storage instance
protected
Filesystem
$storage
Methods
__construct()
Constructor
public
__construct(Filesystem $storage, string $path, string $prefix) : mixed
Parameters
- $storage : Filesystem
- $path : string
- $prefix : string
Return values
mixed —current()
Get current key, value or metadata.
public
current() : mixed
Return values
mixed —getMode()
Get iterator mode
public
getMode() : int
Return values
int —Value of IteratorInterface::CURRENT_AS_*
getStorage()
Get storage instance
public
getStorage() : Filesystem
Return values
Filesystem —key()
Get current key
public
key() : string
Return values
string —next()
Move forward to next element
public
next() : void
Return values
void —rewind()
Rewind the Iterator to the first element.
public
rewind() : bool
Return values
bool —false if the operation failed.
setMode()
Set iterator mode
public
setMode(int $mode) : FilesystemIterator
Parameters
- $mode : int
Return values
FilesystemIterator —Provides a fluent interface
valid()
Checks if current position is valid
public
valid() : bool