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

Public Member Functions

 __construct (Filesystem $storage, $path, $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
 
 $globIterator
 
 $prefix
 
 $prefixLength
 

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 ( Filesystem  $storage,
  $path,
  $prefix 
)

Constructor.

Parameters
Filesystem$storage
string$path
string$prefix

Member Function Documentation

current ( )

Get current key, value or metadata.

Returns
mixed
getMode ( )

Get iterator mode.

Returns
int Value of IteratorInterface::CURRENT_AS_*

Implements IteratorInterface.

getStorage ( )

Get storage instance.

Returns
Filesystem

Implements IteratorInterface.

key ( )

Get current key.

Returns
string
next ( )

Move forward to next element.

Returns
void
rewind ( )

Rewind the Iterator to the first element.

Returns
bool false if the operation failed.
setMode (   $mode)

Set iterator mode.

Parameters
int$mode
Returns
FilesystemIterator Fluent interface

Implements IteratorInterface.

valid ( )

Checks if current position is valid.

Returns
bool

Member Data Documentation

$globIterator
protected
$prefix
protected
$prefixLength
protected
$storage
protected