<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.arrayiterator.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'arrayiterator.construct.php',
    1 => 'ArrayIterator::__construct',
    2 => 'Construye un ArrayIterator',
  ),
  'up' => 
  array (
    0 => 'class.arrayiterator.php',
    1 => 'ArrayIterator',
  ),
  'prev' => 
  array (
    0 => 'arrayiterator.asort.php',
    1 => 'ArrayIterator::asort',
  ),
  'next' => 
  array (
    0 => 'arrayiterator.count.php',
    1 => 'ArrayIterator::count',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/spl/arrayiterator/construct.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="arrayiterator.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ArrayIterator::__construct</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ArrayIterator::__construct</span> &mdash; <span class="dc-title">Construye un ArrayIterator</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-arrayiterator.construct-description">
  <h3 class="title">Descripción</h3>
  <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><strong>ArrayIterator::__construct</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.object.php" class="type object">object</a></span></span> <code class="parameter">$array</code><span class="initializer"> = []</span></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>)</div>

  <p class="para rdfs-comment">
   Construye un <span class="type"><a href="language.types.object.php" class="type object">object</a></span> <span class="classname"><a href="class.arrayiterator.php" class="classname">ArrayIterator</a></span>.
  </p>

  <div class="warning"><strong class="warning">Advertencia</strong> <p class="simpara">Esta función está actualmente
no documentada; solo la lista de sus argumentos está disponible.
</p></div>

 </div>


 <div class="refsect1 parameters" id="refsect1-arrayiterator.construct-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">array</code></dt>
     <dd>
      <p class="simpara">
       El array u objeto a iterar.
       Pasar un <span class="type"><a href="language.types.object.php" class="type object">object</a></span> está deprecado a partir de PHP 8.5.0.
      </p>
     </dd>
    
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       Flags para controlar el comportamiento del objeto <span class="classname"><a href="class.arrayiterator.php" class="classname">ArrayIterator</a></span>.
       Véase <span class="methodname"><a href="arrayiterator.setflags.php" class="methodname">ArrayIterator::setFlags()</a></span>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-arrayiterator.construct-errors">
  <h3 class="title">Errores/Excepciones</h3>
  <p class="simpara">
   A partir de PHP 8.5.0, lanza una
   <span class="exceptionname"><a href="class.invalidargumentexception.php" class="exceptionname">InvalidArgumentException</a></span> si
   <code class="parameter">array</code> es una enumeración.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-arrayiterator.construct-changelog">
  <h3 class="title">Historial de cambios</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versión</th>
      <th>Descripción</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.5.0</td>
      <td>
       Pasar una enumeración como <code class="parameter">array</code> ahora lanza una
       <span class="exceptionname"><a href="class.invalidargumentexception.php" class="exceptionname">InvalidArgumentException</a></span>.
      </td>
     </tr>

     <tr>
      <td>8.5.0</td>
      <td>
       Pasar un <span class="type"><a href="language.types.object.php" class="type object">object</a></span> como <code class="parameter">array</code> está deprecado.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-arrayiterator.construct-seealso">
  <h3 class="title">Véase también</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="arrayiterator.getarraycopy.php" class="methodname" rel="rdfs-seeAlso">ArrayIterator::getArrayCopy()</a> - Obtener copia de un array</span></li>
   <li><span class="methodname"><a href="arrayiterator.setflags.php" class="methodname" rel="rdfs-seeAlso">ArrayIterator::setFlags()</a> - Define los flags de comportamientos</span></li>
   <li><span class="methodname"><a href="arrayobject.construct.php" class="methodname" rel="rdfs-seeAlso">ArrayObject::__construct()</a> - Construye un nuevo objeto array</span></li>
  </ul>
 </div>


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