|
The RecursiveCallbackFilterIterator class(PHP 5 >= 5.4.0) Введение
Обзор классов
RecursiveCallbackFilterIterator
extends
CallbackFilterIterator
implements
OuterIterator
,
Traversable
,
Iterator
,
RecursiveIterator
{
/* Методы */
/* Наследуемые методы */
}ПримерыThe callback should accept up to three arguments: the current item, the current key and the iterator, respectively. Пример #1 Available callback arguments
<?php Filtering a recursive iterator generally involves two conditions. The first is that, to allow recursion, the callback function should return TRUE if the current iterator item has children. The second is the normal filter condition, such as a file size or extension check as in the example below. Пример #2 Recursive callback basic example
<?php Содержание
|
|