<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.recursiveregexiterator.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'recursiveregexiterator.getchildren.php',
    1 => 'RecursiveRegexIterator::getChildren',
    2 => 'Retourne un it&eacute;rateur depuis l\'entr&eacute;e courante',
  ),
  'up' => 
  array (
    0 => 'class.recursiveregexiterator.php',
    1 => 'RecursiveRegexIterator',
  ),
  'prev' => 
  array (
    0 => 'recursiveregexiterator.construct.php',
    1 => 'RecursiveRegexIterator::__construct',
  ),
  'next' => 
  array (
    0 => 'recursiveregexiterator.haschildren.php',
    1 => 'RecursiveRegexIterator::hasChildren',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/spl/recursiveregexiterator/getchildren.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="recursiveregexiterator.getchildren" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">RecursiveRegexIterator::getChildren</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">RecursiveRegexIterator::getChildren</span> &mdash; <span class="dc-title">Retourne un itérateur depuis l&#039;entrée courante</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-recursiveregexiterator.getchildren-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>RecursiveRegexIterator::getChildren</strong></span>(): <span class="type"><a href="class.recursiveregexiterator.php" class="type RecursiveRegexIterator">RecursiveRegexIterator</a></span></div>

  <p class="para rdfs-comment">
   Retourne un itérateur depuis l&#039;entrée courante.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-recursiveregexiterator.getchildren-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">Cette fonction ne contient aucun paramètre.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-recursiveregexiterator.getchildren-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Un itérateur depuis l&#039;entrée courante, s&#039;il peut être itéré par l&#039;itérateur interne.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-recursiveregexiterator.getchildren-errors">
  <h3 class="title">Erreurs / Exceptions</h3>
  <p class="para">
   Une exception <span class="classname"><a href="class.invalidargumentexception.php" class="classname">InvalidArgumentException</a></span> sera émise
   si l&#039;entrée courante ne contient aucune valeur qui peut être itérée par l&#039;itérateur
   interne.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-recursiveregexiterator.getchildren-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <span class="function"><strong>RecursiveRegexIterator::getChildren()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$rArrayIterator </span><span style="color: #007700">= new </span><span style="color: #0000BB">RecursiveArrayIterator</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'test1'</span><span style="color: #007700">, array(</span><span style="color: #DD0000">'tet3'</span><span style="color: #007700">, </span><span style="color: #DD0000">'test4'</span><span style="color: #007700">, </span><span style="color: #DD0000">'test5'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">$rRegexIterator </span><span style="color: #007700">= new </span><span style="color: #0000BB">RecursiveRegexIterator</span><span style="color: #007700">(</span><span style="color: #0000BB">$rArrayIterator</span><span style="color: #007700">, </span><span style="color: #DD0000">'/^test/'</span><span style="color: #007700">,<br />    </span><span style="color: #0000BB">RecursiveRegexIterator</span><span style="color: #007700">::</span><span style="color: #0000BB">ALL_MATCHES</span><span style="color: #007700">);<br /><br />foreach (</span><span style="color: #0000BB">$rRegexIterator </span><span style="color: #007700">as </span><span style="color: #0000BB">$key1 </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$value1</span><span style="color: #007700">) {<br /><br />    if (</span><span style="color: #0000BB">$rRegexIterator</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">hasChildren</span><span style="color: #007700">()) {<br /><br />        </span><span style="color: #FF8000">// Affiche tous les fils<br />        </span><span style="color: #007700">echo </span><span style="color: #DD0000">"Fils : "</span><span style="color: #007700">;<br />        foreach (</span><span style="color: #0000BB">$rRegexIterator</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getChildren</span><span style="color: #007700">() as </span><span style="color: #0000BB">$key </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$value</span><span style="color: #007700">) {<br />            echo </span><span style="color: #0000BB">$value </span><span style="color: #007700">. </span><span style="color: #DD0000">" "</span><span style="color: #007700">;<br />        }<br />        echo </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />    } else {<br />        echo </span><span style="color: #DD0000">"Aucun fils de disponible\n"</span><span style="color: #007700">;<br />    }<br /><br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>L&#039;exemple ci-dessus va afficher :</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Aucun fils de disponible
Fils : test4 test5</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-recursiveregexiterator.getchildren-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="recursiveregexiterator.haschildren.php" class="function" rel="rdfs-seeAlso">RecursiveRegexIterator::hasChildren()</a> - V&eacute;rifie si un it&eacute;rateur peut &ecirc;tre obtenu depuis l'entr&eacute;e courante</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>