在线文档教程
PHP
SPL/Iterators

RecursiveFilterIterator (class)

The RecursiveFilterIterator class

Introduction

(PHP 5 >= 5.1.0, PHP 7)

This abstract iterator filters out unwanted values for a RecursiveIterator. This class should be extended to implement custom filters. The RecursiveFilterIterator::accept() must be implemented in the subclass.

Class synopsis

abstract RecursiveFilterIterator extends FilterIterator implements OuterIterator , RecursiveIterator {

/* Methods */

public __construct ( RecursiveIterator $iterator )

public RecursiveFilterIterator getChildren ( void )

public bool hasChildren ( void )

/* Inherited methods */

public abstract bool FilterIterator::accept ( void )

public FilterIterator::__construct ( Iterator $iterator )

public mixed FilterIterator::current ( void )

public Iterator FilterIterator::getInnerIterator ( void )

public mixed FilterIterator::key ( void )

public void FilterIterator::next ( void )

public void FilterIterator::rewind ( void )

public bool FilterIterator::valid ( void )

}

Table of Contents

  • RecursiveFilterIterator::__construct — Create a RecursiveFilterIterator from a RecursiveIterator

  • RecursiveFilterIterator::getChildren — Return the inner iterator's children contained in a RecursiveFilterIterator

  • RecursiveFilterIterator::hasChildren — Check whether the inner iterator's current element has children

← RecursiveDirectoryIterator::rewind

RecursiveFilterIterator::__construct →

© 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

https://secure.php.net/manual/en/class.recursivefilteriterator.php