=0). */ function getDepth(); /** \param $level the level of the sub iterator to return. * \return the current inner sub iterator or the iterator at the * specified $level. */ function getSubIterator([$level]); } /** \brief An Array wrapper * * This array wrapper allows to recursively iterate over Arrays and Objects. * * \see ArrayIterator */ class ArrayObject implements IteratorAggregate { /** Construct a new array iterator from anything that has a hash table. * That is any Array or Object. * * \param $array the array to use. */ function __construct($array); /** Get the iterator which is a ArrayIterator object connected to this * object. */ function getIterator(); } /** \brief An Array iterator * * This iterator allows to unset and modify values and keys while iterating * over Arrays and Objects. * * To use this class you must instanciate ArrayObject. */ class ArrayIterator implements Iterator { /** Construct a new array iterator from anything that has a hash table. * That is any Array or Object. * * \param $array the array to use. */ private function __construct($array); /** \copydoc Iterator::rewind */ function rewind(); /** \copydoc Iterator::current */ function current(); /** \copydoc Iterator::key */ function key(); /** \copydoc Iterator::next */ function next(); /** \copydoc Iterator::hasMore */ function hasMore(); } /** Iterator that wrapps around another iterator and only returns selected * elements of the inner iterator. */ abstract class FilterIterator implements Iterator { /** Construct an instance form a Iterator. * * \param $iterator inner iterator */ function __construct(Iterator $iterator); /** \return whether the current element of the inner iterator should be * used as a current element of this iterator or if it should be skipped. */ abstract function accept(); /** \copydoc Iterator::rewind */ function rewind(); /** \copydoc Iterator::current */ function current(); /** \copydoc Iterator::key */ function key(); /** \copydoc Iterator::next */ function next(); /** \copydoc Iterator::hasMore */ function hasMore(); } /** A recursive iterator that only returns elements that themselves can be * trversed. */ class ParentIterator extends FilterIterator implements RecursiveIterator { /** Construct an instance form a RecursiveIterator. * * \param $iterator inner iterator */ function __construct(RecursiveIterator $iterator); /** \copydoc RecursiveIterator::hasChildren */ function hasChildren(); /** \copydoc RecursiveIterator::getChildren */ function getChildren(); /** \copydoc Iterator::rewind */ function rewind(); /** \copydoc Iterator::current */ function current(); /** \copydoc Iterator::key */ function key(); /** \copydoc Iterator::next */ function next(); /** \copydoc Iterator::hasMore */ function hasMore(); } /** \brief Directory iterator */ class DirectoryIterator implements Iterator { /** Construct a directory iterator from a path-string. * * \param $path directory to iterate. */ function __construct($path); /** \copydoc Iterator::rewind */ function rewind(); /** \copydoc Iterator::current */ function current(); /** \copydoc Iterator::next */ function next(); /** \copydoc Iterator::hasMore */ function hasMore(); /** \return The opened path. */ function getPath(); /** \return The current file name. */ function getFilename(); /** \return The current entries path and file name. */ function getPathname(); /** \return Whether the current entry is a directory. */ function isDir(); /** \return Whether the current entry is either '.' or '..'. */ function isDot(); } /** \brief recursive directory iterator */ class RecursiveDirectoryIterator extends DirectoryIterator implements RecursiveIterator { /** \return whether the current is a directory (not '.' or '..'). */ function hasChildren(); /** \return a RecursiveDirectoryIterator for the current entry. */ function getChildren(); } ?>