<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.spldoublylinkedlist.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'spldoublylinkedlist.setiteratormode.php',
    1 => 'SplDoublyLinkedList::setIteratorMode',
    2 => 'Sets the mode of iteration',
  ),
  'up' => 
  array (
    0 => 'class.spldoublylinkedlist.php',
    1 => 'SplDoublyLinkedList',
  ),
  'prev' => 
  array (
    0 => 'spldoublylinkedlist.serialize.php',
    1 => 'SplDoublyLinkedList::serialize',
  ),
  'next' => 
  array (
    0 => 'spldoublylinkedlist.shift.php',
    1 => 'SplDoublyLinkedList::shift',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/spl/spldoublylinkedlist/setiteratormode.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="spldoublylinkedlist.setiteratormode" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SplDoublyLinkedList::setIteratorMode</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SplDoublyLinkedList::setIteratorMode</span> &mdash; <span class="dc-title">Sets the mode of iteration</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-spldoublylinkedlist.setiteratormode-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SplDoublyLinkedList::setIteratorMode</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

 </div>


 <div class="refsect1 parameters" id="refsect1-spldoublylinkedlist.setiteratormode-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">
       There are two orthogonal sets of modes that can be set:
      </p>
      <ul class="itemizedlist">
       <li class="listitem">
        <span class="simpara">The direction of the iteration (either one or the other):</span>
        <ul class="itemizedlist">
         <li class="listitem"><span class="simpara"><strong><code><a href="class.spldoublylinkedlist.php#spldoublylinkedlist.constants.it-mode-lifo">SplDoublyLinkedList::IT_MODE_LIFO</a></code></strong> (Stack style)</span></li>
         <li class="listitem"><span class="simpara"><strong><code><a href="class.spldoublylinkedlist.php#spldoublylinkedlist.constants.it-mode-fifo">SplDoublyLinkedList::IT_MODE_FIFO</a></code></strong> (Queue style)</span></li>
        </ul>
       </li>
       <li class="listitem">
        <span class="simpara">The behavior of the iterator (either one or the other):</span>
        <ul class="itemizedlist">
         <li class="listitem"><span class="simpara"><strong><code><a href="class.spldoublylinkedlist.php#spldoublylinkedlist.constants.it-mode-delete">SplDoublyLinkedList::IT_MODE_DELETE</a></code></strong> (Elements are deleted by the iterator)</span></li>
         <li class="listitem"><span class="simpara"><strong><code><a href="class.spldoublylinkedlist.php#spldoublylinkedlist.constants.it-mode-keep">SplDoublyLinkedList::IT_MODE_KEEP</a></code></strong> (Elements are traversed by the iterator)</span></li>
        </ul>
       </li>
      </ul>

      <p class="para">
       The default mode is: <strong><code><a href="class.spldoublylinkedlist.php#spldoublylinkedlist.constants.it-mode-fifo">SplDoublyLinkedList::IT_MODE_FIFO</a></code></strong> | <strong><code><a href="class.spldoublylinkedlist.php#spldoublylinkedlist.constants.it-mode-keep">SplDoublyLinkedList::IT_MODE_KEEP</a></code></strong>
      </p>

      <div class="warning"><strong class="warning">Warnung</strong>
       <p class="para">
        The direction of iteration can not be changed for <span class="classname"><a href="class.splstack.php" class="classname">SplStack</a></span> and
        <span class="classname"><a href="class.splqueue.php" class="classname">SplQueue</a></span> classes, it is always <strong><code><a href="class.spldoublylinkedlist.php#spldoublylinkedlist.constants.it-mode-fifo">SplDoublyLinkedList::IT_MODE_FIFO</a></code></strong>.
        Trying to modify it will result in a <span class="classname"><a href="class.runtimeexception.php" class="classname">RuntimeException</a></span> being thrown.
       </p>
      </div>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-spldoublylinkedlist.setiteratormode-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Returns the different modes and flags that affect the iteration.
  </p>
 </div>


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