# RecursiveTreeIterator クラス

(PHP 5 >= 5.3.0, PHP 7)

## はじめに

RecursiveIterator を反復処理し、ASCII グラフィックツリーを生成します。

## クラス概要

RecursiveTreeIterator extends RecursiveIteratorIterator implements OuterIterator {
/* 定数 */
const integer BYPASS_CURRENT = 4 ;
const integer BYPASS_KEY = 8 ;
const integer PREFIX_LEFT = 0 ;
const integer PREFIX_MID_HAS_NEXT = 1 ;
const integer PREFIX_MID_LAST = 2 ;
const integer PREFIX_END_HAS_NEXT = 3 ;
const integer PREFIX_END_LAST = 4 ;
const integer PREFIX_RIGHT = 5 ;
/* メソッド */
public beginChildren ( void ) : void
public beginIteration ( void ) : RecursiveIterator
public callGetChildren ( void ) : RecursiveIterator
public callHasChildren ( void ) : bool
public __construct ( RecursiveIterator|IteratorAggregate `$it` [, int `$flags` = RecursiveTreeIterator::BYPASS_KEY [, int `$cit_flags` = CachingIterator::CATCH_GET_CHILD [, int `$mode` = RecursiveIteratorIterator::SELF_FIRST ]]] )
public current ( void ) : string
public endChildren ( void ) : void
public endIteration ( void ) : void
public getEntry ( void ) : string
public getPostfix ( void ) : void
public getPrefix ( void ) : string
public key ( void ) : string
public next ( void ) : void
public nextElement ( void ) : void
public rewind ( void ) : void
public setPostfix ( string `$postfix` ) : void
public setPrefixPart ( int `$part` , string `$value` ) : void
public valid ( void ) : bool
/* 継承したメソッド */
public RecursiveIteratorIterator::beginChildren ( void ) : void
public RecursiveIteratorIterator::beginIteration ( void ) : void
public RecursiveIteratorIterator::callGetChildren ( void ) : RecursiveIterator
public RecursiveIteratorIterator::callHasChildren ( void ) : bool
public RecursiveIteratorIterator::__construct ( Traversable `$iterator` [, int `$mode` = RecursiveIteratorIterator::LEAVES_ONLY [, int `$flags` = 0 ]] )
public RecursiveIteratorIterator::current ( void ) : mixed
public RecursiveIteratorIterator::endChildren ( void ) : void
public RecursiveIteratorIterator::endIteration ( void ) : void
public RecursiveIteratorIterator::getDepth ( void ) : int
public RecursiveIteratorIterator::getInnerIterator ( void ) : iterator
public RecursiveIteratorIterator::getMaxDepth ( void ) : mixed
public RecursiveIteratorIterator::getSubIterator ([ int `$level` ] ) : RecursiveIterator
public RecursiveIteratorIterator::key ( void ) : mixed
public RecursiveIteratorIterator::next ( void ) : void
public RecursiveIteratorIterator::nextElement ( void ) : void
public RecursiveIteratorIterator::rewind ( void ) : void
public RecursiveIteratorIterator::setMaxDepth ([ string `$max_depth` = -1 ] ) : void
public RecursiveIteratorIterator::valid ( void ) : bool
}

## 定義済み定数

`RecursiveTreeIterator::BYPASS_CURRENT`

`RecursiveTreeIterator::BYPASS_KEY`

`RecursiveTreeIterator::PREFIX_LEFT`

`RecursiveTreeIterator::PREFIX_MID_HAS_NEXT`

`RecursiveTreeIterator::PREFIX_MID_LAST`

`RecursiveTreeIterator::PREFIX_END_HAS_NEXT`

`RecursiveTreeIterator::PREFIX_END_LAST`

`RecursiveTreeIterator::PREFIX_RIGHT`

## 目次

- RecursiveTreeIterator::beginChildren — 子を開始する
- RecursiveTreeIterator::beginIteration — 反復処理を開始する
- RecursiveTreeIterator::callGetChildren — 子を取得する
- RecursiveTreeIterator::callHasChildren — 子を持っているかどうかを調べる
- RecursiveTreeIterator::__construct — RecursiveTreeIterator を作成する
- RecursiveTreeIterator::current — 現在の要素を取得する
- RecursiveTreeIterator::endChildren — 子を終了する
- RecursiveTreeIterator::endIteration — 反復処理を終了する
- RecursiveTreeIterator::getEntry — 現在のエントリを取得する
- RecursiveTreeIterator::getPostfix — 接尾辞を取得する
- RecursiveTreeIterator::getPrefix — 接頭辞を取得する
- RecursiveTreeIterator::key — 現在の要素のキーを取得する
- RecursiveTreeIterator::next — 次の要素に移動する
- RecursiveTreeIterator::nextElement — 次の要素
- RecursiveTreeIterator::rewind — イテレータを巻き戻す
- RecursiveTreeIterator::setPostfix — Set postfix
- RecursiveTreeIterator::setPrefixPart — 接頭辞の部分を設定する
- RecursiveTreeIterator::valid — 有効性を調べる