PHP Class Puli\Repository\Resource\Iterator\RecursiveResourceIteratorIterator

Use this iterator to iterate recursively over a recursive resource iterator: php $iterator = new RecursiveResourceIteratorIterator( new ResourceCollectionIterator( $collection, ResourceCollectionIterator::KEY_AS_PATH | ResourceCollectionIterator::CURRENT_AS_RESOURCE ), RecursiveResourceIteratorIterator::SELF_FIRST ); foreach ($iterator as $path => $resource) { ... } The configuration of this iterator works identically to its parent class {@link RecursiveIteratorIterator}.
Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: extends RecursiveIteratorIterato\RecursiveIteratorIterator, implements Puli\Repository\Api\ResourceIterator
Mostra file Open project: puli/repository

Public Methods

Method Description
__construct ( RecursiveResourceIterator $iterator, integer $mode = self::LEAVES_ONLY, integer $flags ) Creates a new iterator.
getCurrentResource ( )

Method Details

__construct() public method

Creates a new iterator.
See also: RecursiveIteratorIterator::__construct
public __construct ( RecursiveResourceIterator $iterator, integer $mode = self::LEAVES_ONLY, integer $flags )
$iterator RecursiveResourceIterator The inner iterator.
$mode integer The iteration mode.
$flags integer The iteration flags.

getCurrentResource() public method

public getCurrentResource ( )