RecursiveArrayIterator クラス

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

はじめに

このイテレータは、ArrayIterator と同じように配列やオブジェクトを反復処理しつつ、 そのキーや値を消去したり書き換えたりすることができます。 さらに、現在のイテレータのエントリを反復処理することも可能です。

クラス概要

class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator {
/* 継承した定数 */
public const int ArrayIterator::STD_PROP_LIST;
/* 定数 */
public const int CHILD_ARRAYS_ONLY;
/* メソッド */
public hasChildren(): bool
/* 継承したメソッド */
public ArrayIterator::__construct(array|object $array = [], int $flags = 0)
public ArrayIterator::append(mixed $value): void
public ArrayIterator::asort(int $flags = SORT_REGULAR): true
public ArrayIterator::count(): int
public ArrayIterator::key(): string|int|null
public ArrayIterator::ksort(int $flags = SORT_REGULAR): true
public ArrayIterator::natsort(): true
public ArrayIterator::next(): void
public ArrayIterator::offsetSet(mixed $key, mixed $value): void
public ArrayIterator::rewind(): void
public ArrayIterator::seek(int $offset): void
public ArrayIterator::serialize(): string
public ArrayIterator::setFlags(int $flags): void
public ArrayIterator::uasort(callable $callback): true
public ArrayIterator::uksort(callable $callback): true
public ArrayIterator::unserialize(string $data): void
public ArrayIterator::valid(): bool
}

定義済み定数

RecursiveArrayIterator フラグ

RecursiveArrayIterator::CHILD_ARRAYS_ONLY

(オブジェクトではなく)配列のみが、再帰的な走査が可能な子を持つと見なす

目次