RecursiveRegexIterator::hasChildren
RecursiveTreeIterator::beginChildren
Itérateurs
PHP Manual

# La classe RecursiveTreeIterator

(PHP 5 >= 5.3.0)

## Introduction

Permet l'itération d'un RecursiveIterator pour générer un arbre graphique ASCII.

## Synopsis de la classe

RecursiveTreeIterator extends RecursiveIteratorIterator implements OuterIterator {
/* Constantes */
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 ;
/* Méthodes */
public void beginChildren ( void )
public RecursiveIterator beginIteration ( void )
public RecursiveIterator callGetChildren ( void )
public bool callHasChildren ( void )
public __construct ( RecursiveIterator|IteratorAggregate `$it` [, int `$flags` = RecursiveTreeIterator::BYPASS_KEY [, int `$cit_flags` = CachingIterator::CATCH_GET_CHILD [, int `$mode` = RecursiveIteratorIterator::SELF_FIRST ]]] )
public string current ( void )
public void endChildren ( void )
public void endIteration ( void )
public string getEntry ( void )
public void getPostfix ( void )
public string getPrefix ( void )
public string key ( void )
public void next ( void )
public void nextElement ( void )
public void rewind ( void )
public void setPrefixPart ( int `$part` , string `$value` )
public bool valid ( void )
/* Méthodes héritées */
public void RecursiveIteratorIterator::beginChildren ( void )
public void RecursiveIteratorIterator::beginIteration ( void )
public RecursiveIterator RecursiveIteratorIterator::callGetChildren ( void )
public bool RecursiveIteratorIterator::callHasChildren ( void )
public RecursiveIteratorIterator::__construct ( Traversable `$iterator` [, int `$mode` = RecursiveIteratorIterator::LEAVES_ONLY [, int `$flags` = 0 ]] )
public mixed RecursiveIteratorIterator::current ( void )
public void RecursiveIteratorIterator::endChildren ( void )
public void RecursiveIteratorIterator::endIteration ( void )
public int RecursiveIteratorIterator::getDepth ( void )
public iterator RecursiveIteratorIterator::getInnerIterator ( void )
public mixed RecursiveIteratorIterator::getMaxDepth ( void )
public RecursiveIterator RecursiveIteratorIterator::getSubIterator ([ int `$level` ] )
public mixed RecursiveIteratorIterator::key ( void )
public void RecursiveIteratorIterator::next ( void )
public void RecursiveIteratorIterator::nextElement ( void )
public void RecursiveIteratorIterator::rewind ( void )
public void RecursiveIteratorIterator::setMaxDepth ([ string `$max_depth` = -1 ] )
public bool RecursiveIteratorIterator::valid ( void )
}

## Constantes pré-définies

`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`

## Sommaire

- RecursiveTreeIterator::beginChildren — Début d'un fils
- RecursiveTreeIterator::beginIteration — Début d'une itération
- RecursiveTreeIterator::callGetChildren — Récupère un fils
- RecursiveTreeIterator::callHasChildren — Vérifie la présence d'un fils
- RecursiveTreeIterator::__construct — Construit un nouvel objet RecursiveTreeIterator
- RecursiveTreeIterator::current — Récupère l'élément courant
- RecursiveTreeIterator::endChildren — Fin d'un fils
- RecursiveTreeIterator::endIteration — Fin de l'itération
- RecursiveTreeIterator::getEntry — Récupère l'entrée courante
- RecursiveTreeIterator::getPostfix — Récupère le suffixe
- RecursiveTreeIterator::getPrefix — Récupère le préfixe
- RecursiveTreeIterator::key — Récupère la clé de l'élément courant
- RecursiveTreeIterator::next — Se déplace sur l'élément suivant
- RecursiveTreeIterator::nextElement — Prochain élément
- RecursiveTreeIterator::rewind — Réinitialise la position de l'itérateur
- RecursiveTreeIterator::setPrefixPart — Définit une partie du préfixe
- RecursiveTreeIterator::valid — Vérifie la validité

RecursiveRegexIterator::hasChildren
RecursiveTreeIterator::beginChildren
Itérateurs
PHP Manual