<?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 => 'ja',
  ),
  'this' => 
  array (
    0 => 'spldoublylinkedlist.setiteratormode.php',
    1 => 'SplDoublyLinkedList::setIteratorMode',
    2 => '反復処理のモードを設定する',
  ),
  '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' => 'ja',
    '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">反復処理のモードを設定する</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-spldoublylinkedlist.setiteratormode-description">
  <h3 class="title">説明</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">パラメータ</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">
       次の 2 種類の直交するモードを設定できます。
      </p>
      <ul class="itemizedlist">
       <li class="listitem">
        <span class="simpara">反復処理の方向 (いずれかを選択)</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> (スタック方式)</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> (キュー方式)</span></li>
        </ul>
       </li>
       <li class="listitem">
        <span class="simpara">イテレータの振る舞い (いずれかを選択)</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> (イテレータが要素を削除する)</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> (イテレータが要素を順にたどる)</span></li>
        </ul>
       </li>
      </ul>

      <p class="para">
       デフォルトのモードは <strong><code><a href="class.spldoublylinkedlist.php#spldoublylinkedlist.constants.it-mode-fifo">SplDoublyLinkedList::IT_MODE_FIFO</a></code></strong> | <strong><code>SplDoublyLnkedList::IT_MODE_KEEP</code></strong> です。
      </p>

      <div class="warning"><strong class="warning">警告</strong>
       <p class="para">
        <span class="classname"><a href="class.splstack.php" class="classname">SplStack</a></span> と <span class="classname"><a href="class.splqueue.php" class="classname">SplQueue</a></span> においては、反復処理の方向は変更できません。
        これらのクラスでは、反復処理の方向は常に <strong><code><a href="class.spldoublylinkedlist.php#spldoublylinkedlist.constants.it-mode-fifo">SplDoublyLinkedList::IT_MODE_FIFO</a></code></strong> になります。
        この値を変更しようとすると、<span class="classname"><a href="class.runtimeexception.php" class="classname">RuntimeException</a></span> がスローされます。
       </p>
      </div>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-spldoublylinkedlist.setiteratormode-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   反復処理に影響する、異なるモードとフラグの値を返します。
  </p>
 </div>


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