<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.apcuiterator.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'apcuiterator.construct.php',
    1 => 'APCUIterator::__construct',
    2 => 'Constructs an APCUIterator iterator object',
  ),
  'up' => 
  array (
    0 => 'class.apcuiterator.php',
    1 => 'APCUIterator',
  ),
  'prev' => 
  array (
    0 => 'class.apcuiterator.php',
    1 => 'APCUIterator',
  ),
  'next' => 
  array (
    0 => 'apcuiterator.current.php',
    1 => 'APCUIterator::current',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/apcu/apcuiterator/construct.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="apcuiterator.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">APCUIterator::__construct</h1>
  <p class="verinfo">(PECL apcu &gt;= 5.0.0)</p><p class="refpurpose"><span class="refname">APCUIterator::__construct</span> &mdash; <span class="dc-title">Constructs an APCUIterator iterator object</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-apcuiterator.construct-description">
  <h3 class="title">Descrizione</h3>
  <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>APCUIterator::__construct</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<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.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.null.php" class="type null">null</a></span></span> <code class="parameter">$search</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$format</code><span class="initializer"> = APC_ITER_ALL</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$chunk_size</code><span class="initializer"> = 100</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$list</code><span class="initializer"> = APC_LIST_ACTIVE</span></span><br>)</div>

  <p class="simpara">
   Constructs an <span class="classname"><a href="class.apcuiterator.php" class="classname">APCUIterator</a></span> <span class="type"><a href="language.types.object.php" class="type object">object</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-apcuiterator.construct-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">search</code></dt>
    <dd>
     <span class="simpara">
      Either a <a href="book.pcre.php" class="link">PCRE</a> regular expression that
      matches against APCu key names, given as a <span class="type"><a href="language.types.string.php" class="type string">string</a></span>.
      Or an <span class="type"><a href="language.types.array.php" class="type array">array</a></span> of <span class="type"><a href="language.types.string.php" class="type string">string</a></span>s with APCu key names.
      Or, optionally <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> to skip the search.
     </span>
    </dd>
   
   
    <dt><code class="parameter">format</code></dt>
    <dd>
     <span class="simpara">
      The desired format, as configured with one or more of the
      <a href="apcu.constants.php" class="link">APC_ITER_*</a> constants.
     </span>
    </dd>
   
   
    <dt><code class="parameter">chunk_size</code></dt>
    <dd>
     <span class="simpara">
      The chunk size. Must be a value greater than 0. The default
      value is 100.
     </span>
    </dd>
   
   
    <dt><code class="parameter">list</code></dt>
    <dd>
     <span class="simpara">
      The type to list. Either pass in <strong><code><a href="apcu.constants.php#constant.apc-list-active">APC_LIST_ACTIVE</a></code></strong>
      or <strong><code><a href="apcu.constants.php#constant.apc-list-deleted">APC_LIST_DELETED</a></code></strong>.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 examples" id="refsect1-apcuiterator.construct-examples">
  <h3 class="title">Esempi</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 A <span class="function"><strong>APCUIterator::__construct()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">foreach (new </span><span style="color: #0000BB">APCUIterator</span><span style="color: #007700">(</span><span style="color: #DD0000">'/^counter\./'</span><span style="color: #007700">) as </span><span style="color: #0000BB">$counter</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">"</span><span style="color: #0000BB">$counter</span><span style="color: #007700">[</span><span style="color: #0000BB">key</span><span style="color: #007700">]</span><span style="color: #DD0000">: </span><span style="color: #0000BB">$counter</span><span style="color: #007700">[</span><span style="color: #0000BB">value</span><span style="color: #007700">]</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />    </span><span style="color: #0000BB">apc_dec</span><span style="color: #007700">(</span><span style="color: #0000BB">$counter</span><span style="color: #007700">[</span><span style="color: #DD0000">'key'</span><span style="color: #007700">], </span><span style="color: #0000BB">$counter</span><span style="color: #007700">[</span><span style="color: #DD0000">'value'</span><span style="color: #007700">]);<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-apcuiterator.construct-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.apcu-exists.php" class="function" rel="rdfs-seeAlso">apcu_exists()</a> - Checks if entry exists</span></li>
   <li><span class="function"><a href="function.apcu-cache-info.php" class="function" rel="rdfs-seeAlso">apcu_cache_info()</a> - Retrieves cached information from APCu's data store</span></li>
  </ul>
 </div>


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