<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.quickhash.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'class.quickhashinthash.php',
    1 => 'QuickHashIntHash',
    2 => 'Класс QuickHashIntHash',
  ),
  'up' => 
  array (
    0 => 'book.quickhash.php',
    1 => 'Quickhash',
  ),
  'prev' => 
  array (
    0 => 'quickhashintset.savetostring.php',
    1 => 'QuickHashIntSet::saveToString',
  ),
  'next' => 
  array (
    0 => 'quickhashinthash.add.php',
    1 => 'QuickHashIntHash::add',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/quickhash/quickhashinthash.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.quickhashinthash.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.quickhashinthash" class="reference">

 <h1 class="title">Класс QuickHashIntHash</h1>
 

 <div class="partintro"><p class="verinfo">(PECL quickhash &gt;= Unknown)</p>

  
  <div class="section" id="quickhashinthash.intro">
   <h2 class="title">Введение</h2>
   <p class="simpara">
    Класс-обёртка для хеш-таблицы с ключами и значениями в виде
    целых чисел. Хеши также доступны как реализация интерфейса <span class="interfacename"><a href="class.arrayaccess.php" class="interfacename">ArrayAccess</a></span>.
   </p>
   <p class="simpara">
    Хеши также можно перебирать конструкцией <a href="control-structures.foreach.php" class="link"><code class="literal">foreach</code></a>,
    поскольку интерфейс <span class="interfacename"><a href="class.iterator.php" class="interfacename">Iterator</a></span> также реализовали.
    Порядок, в котором хеш возвращает элементы, не гарантируется.
   </p>
  </div>
  

  <div class="section" id="quickhashinthash.synopsis">
   <h2 class="title">Обзор класса</h2>

   
   <div class="classsynopsis">
    <span class="ooclass"><strong class="classname"></strong></span>

    
    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">QuickHashIntHash</strong>
     </span>
     {</div>
    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Константы */</div>
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.quickhashinthash.php#quickhashinthash.constants.check-for-dupes"><var class="varname">CHECK_FOR_DUPES</var></a></var><span class="initializer"> = 1</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.quickhashinthash.php#quickhashinthash.constants.do-not-use-zend-alloc"><var class="varname">DO_NOT_USE_ZEND_ALLOC</var></a></var><span class="initializer"> = 2</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.quickhashinthash.php#quickhashinthash.constants.hasher-no-hash"><var class="varname">HASHER_NO_HASH</var></a></var><span class="initializer"> = 256</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.quickhashinthash.php#quickhashinthash.constants.hasher-jenkins1"><var class="varname">HASHER_JENKINS1</var></a></var><span class="initializer"> = 512</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.quickhashinthash.php#quickhashinthash.constants.hasher-jenkins2"><var class="varname">HASHER_JENKINS2</var></a></var><span class="initializer"> = 1024</span>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Методы */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="quickhashinthash.add.php" class="methodname">add</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$value</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="quickhashinthash.construct.php" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$size</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$options</code><span class="initializer"> = ?</span></span>)</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="quickhashinthash.delete.php" class="methodname">delete</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$key</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="quickhashinthash.exists.php" class="methodname">exists</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$key</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="quickhashinthash.get.php" class="methodname">get</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$key</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="quickhashinthash.getsize.php" class="methodname">getSize</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="quickhashinthash.loadfromfile.php" class="methodname">loadFromFile</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$filename</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$options</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="class.quickhashinthash.php" class="type QuickHashIntHash">QuickHashIntHash</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="quickhashinthash.loadfromstring.php" class="methodname">loadFromString</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$contents</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$options</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="class.quickhashinthash.php" class="type QuickHashIntHash">QuickHashIntHash</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="quickhashinthash.savetofile.php" class="methodname">saveToFile</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$filename</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="quickhashinthash.savetostring.php" class="methodname">saveToString</a></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="quickhashinthash.set.php" class="methodname">set</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="quickhashinthash.update.php" class="methodname">update</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

   }</div>
   

  </div>

  
  <div class="section" id="quickhashinthash.constants">
   <h2 class="title">Предопределённые константы</h2>
   <dl>

    
     <dt id="quickhashinthash.constants.check-for-dupes"><strong><code><a href="class.quickhashinthash.php#quickhashinthash.constants.check-for-dupes">QuickHashIntHash::CHECK_FOR_DUPES</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Если опцию включили, добавление повторяющихся элементов в набор
       (методом <span class="methodname"><a href="quickhashinthash.add.php" class="methodname">QuickHashIntHash::add()</a></span> или <span class="methodname"><a href="quickhashinthash.loadfromfile.php" class="methodname">QuickHashIntHash::loadFromFile()</a></span>)
       приведёт к отбрасыванию этих элементов.
       Это займёт дополнительное время, поэтому опцию включают только при необходимости.
      </span>
     </dd>
    

    
     <dt id="quickhashinthash.constants.do-not-use-zend-alloc"><strong><code><a href="class.quickhashinthash.php#quickhashinthash.constants.do-not-use-zend-alloc">QuickHashIntHash::DO_NOT_USE_ZEND_ALLOC</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Запрещает использование встроенного в PHP менеджера памяти для
       внутренних структур. Если опцию включили, используемая память
       не будет учитываться настройкой <a href="ini.core.php#ini.memory-limit" class="link">memory_limit</a>.
      </span>
     </dd>
    

    
     <dt id="quickhashinthash.constants.hasher-no-hash"><strong><code><a href="class.quickhashinthash.php#quickhashinthash.constants.hasher-no-hash">QuickHashIntHash::HASHER_NO_HASH</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Указывает, что не нужно использовать функцию хеширования,
       а вместо неё, для поиска индекса в цепочке, использовать модуль.
       Это не быстрее обычного хеширования и порождает больше коллизий.
      </span>
     </dd>
    

    
     <dt id="quickhashinthash.constants.hasher-jenkins1"><strong><code><a href="class.quickhashinthash.php#quickhashinthash.constants.hasher-jenkins1">QuickHashIntHash::HASHER_JENKINS1</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Хеширующая функция по умолчанию.
      </span>
     </dd>
    

    
     <dt id="quickhashinthash.constants.hasher-jenkins2"><strong><code><a href="class.quickhashinthash.php#quickhashinthash.constants.hasher-jenkins2">QuickHashIntHash::HASHER_JENKINS2</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Другой хеширующий алгоритм.
      </span>
     </dd>
    

   </dl>
  </div>
  

 </div>

 








































































<h2>Содержание</h2><ul class="chunklist chunklist_reference"><li><a href="quickhashinthash.add.php">QuickHashIntHash::add</a> — Добавляет элемент в хеш</li><li><a href="quickhashinthash.construct.php">QuickHashIntHash::__construct</a> — Создаёт объект QuickHashIntHash</li><li><a href="quickhashinthash.delete.php">QuickHashIntHash::delete</a> — Удаляет запись из хеша</li><li><a href="quickhashinthash.exists.php">QuickHashIntHash::exists</a> — Проверяет, представляет ли собой ключ часть хеша</li><li><a href="quickhashinthash.get.php">QuickHashIntHash::get</a> — Извлекает значение из хеша по ключу</li><li><a href="quickhashinthash.getsize.php">QuickHashIntHash::getSize</a> — Возвращает количество элементов в хеше</li><li><a href="quickhashinthash.loadfromfile.php">QuickHashIntHash::loadFromFile</a> — Создаёт хеш из файла</li><li><a href="quickhashinthash.loadfromstring.php">QuickHashIntHash::loadFromString</a> — Создаёт хеш из строки</li><li><a href="quickhashinthash.savetofile.php">QuickHashIntHash::saveToFile</a> — Сохраняет хеш в памяти на диск</li><li><a href="quickhashinthash.savetostring.php">QuickHashIntHash::saveToString</a> — Возвращает сериализованную версию хеша</li><li><a href="quickhashinthash.set.php">QuickHashIntHash::set</a> — Обновляет запись в хеше новым значением или добавляет новую, если хеш не содержит запись</li><li><a href="quickhashinthash.update.php">QuickHashIntHash::update</a> — Обновляет запись в хеше новым значением</li></ul>
</div>
<?php manual_footer($setup); ?>