<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.iterator.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'iterator.rewind.php',
    1 => 'Iterator::rewind',
    2 => 'Replace l\'it&eacute;rateur sur le premier &eacute;l&eacute;ment',
  ),
  'up' => 
  array (
    0 => 'class.iterator.php',
    1 => 'Iterator',
  ),
  'prev' => 
  array (
    0 => 'iterator.next.php',
    1 => 'Iterator::next',
  ),
  'next' => 
  array (
    0 => 'iterator.valid.php',
    1 => 'Iterator::valid',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'language/predefined/iterator/rewind.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="iterator.rewind" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Iterator::rewind</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">Iterator::rewind</span> &mdash; <span class="dc-title">Replace l&#039;itérateur sur le premier élément</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-iterator.rewind-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Iterator::rewind</strong></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   Replace l&#039;itérateur sur le premier élément.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    C&#039;est la <em>première</em> méthode appelée lors du départ
    d&#039;une boucle <a href="control-structures.foreach.php" class="link"><code class="literal">foreach</code></a>. Elle ne sera <em>pas</em>
    exécutée <em>après</em> la boucle <a href="control-structures.foreach.php" class="link"><code class="literal">foreach</code></a>.
   </p>
   <span class="simpara">
    Comme <a href="control-structures.foreach.php" class="link"><code class="literal">foreach</code></a> appelle toujours <span class="methodname"><a href="function.rewind.php" class="methodname">rewind()</a></span> avant de
    commencer l&#039;itération, avancer manuellement la position de l&#039;itérateur
    (par exemple via <span class="methodname"><a href="splfileobject.seek.php" class="methodname">SplFileObject::seek()</a></span>) sera réinitialisé.
   </span>
   <span class="simpara">
    Pour itérer sans rembobiner l&#039;itérateur, il est possible de
    l&#039;encapsuler dans un <span class="classname"><a href="class.norewinditerator.php" class="classname">NoRewindIterator</a></span>.
   </span>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-iterator.rewind-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-iterator.rewind-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Toutes les valeurs retournées sont ignorées.
  </p>
 </div>


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