1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
<?xml version="1.0" encoding="UTF-8" ?>
<class xmlns="http://xml.phpdox.net/src" full="QuickHashIntStringHash" namespace="" name="QuickHashIntStringHash">
<constant name="CHECK_FOR_DUPES" value="1">
<docblock>
<var type="integer"/>
</docblock>
</constant>
<constant name="DO_NOT_USE_ZEND_ALLOC" value="2">
<docblock>
<var type="integer"/>
</docblock>
</constant>
<constant name="HASHER_NO_HASH" value="256">
<docblock>
<var type="integer"/>
</docblock>
</constant>
<constant name="HASHER_JENKINS1" value="512">
<docblock>
<var type="integer"/>
</docblock>
</constant>
<constant name="HASHER_JENKINS2" value="1024">
<docblock>
<var type="integer"/>
</docblock>
</constant>
<method name="add" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="This method adds a new entry to the hash"/>
<return type="bool"/>
</docblock>
<parameter name="key" optional="false" byreference="false" type="int"/>
<parameter name="value" optional="false" byreference="false" type="string"/>
</method>
<constructor name="__construct" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Creates a new QuickHashIntStringHash object"/>
<return type="void"/>
</docblock>
<parameter name="size" optional="false" byreference="false" type="int"/>
<parameter name="options" optional="true" byreference="false" type="int"/>
</constructor>
<method name="delete" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="This method deletes am entry from the hash">This method deletes an entry from the hash, and returns whether the entry was deleted or not. Associated memory structures will not be freed immediately, but rather when the hash itself is freed.</description>
<return type="bool"/>
</docblock>
<parameter name="key" optional="false" byreference="false" type="int"/>
</method>
<method name="exists" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="This method checks whether a key is part of the hash"/>
<return type="bool"/>
</docblock>
<parameter name="key" optional="false" byreference="false" type="int"/>
</method>
<method name="get" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="This method retrieves a value from the hash by its key"/>
<return type="mixed"/>
</docblock>
<parameter name="key" optional="false" byreference="false" type="int"/>
</method>
<method name="getSize" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="Returns the number of elements in the hash"/>
<return type="int"/>
</docblock>
</method>
<method name="loadFromFile" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="This factory method creates a hash from a file">This factory method creates a new hash from a definition file on disk. The file format consists of a signature 'QH\0x12\0', the number of elements as a 32 bit signed integer in system Endianness, an unsigned 32 bit integer containing the number of element data to follow in characters. This element data contains all the strings. After the header and the strings, the elements follow in pairs of two unsigned 32 bit integers where the first one is the key, and the second one the index in the element data string. An example could be:</description>
<return type="QuickHashIntStringHash"/>
</docblock>
<parameter name="filename" optional="false" byreference="false" type="string"/>
<parameter name="size" optional="true" byreference="false" type="int"/>
<parameter name="options" optional="true" byreference="false" type="int"/>
</method>
<method name="loadFromString" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="This factory method creates a hash from a string"/>
<return type="QuickHashIntStringHash"/>
</docblock>
<parameter name="contents" optional="false" byreference="false" type="string"/>
<parameter name="size" optional="true" byreference="false" type="int"/>
<parameter name="options" optional="true" byreference="false" type="int"/>
</method>
<method name="saveToFile" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="This method stores an in-memory hash to disk"/>
<return type="void"/>
</docblock>
<parameter name="filename" optional="false" byreference="false" type="string"/>
</method>
<method name="saveToString" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="This method returns a serialized version of the hash"/>
<return type="string"/>
</docblock>
</method>
<method name="set" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="This method updates an entry in the hash with a new value, or adds a new one if the entry doesn't exist"/>
<return type="int"/>
</docblock>
<parameter name="key" optional="false" byreference="false" type="int"/>
<parameter name="value" optional="false" byreference="false" type="string"/>
</method>
<method name="update" abstract="false" static="false" visibility="public" final="false">
<docblock>
<description compact="This method updates an entry in the hash with a new value"/>
<return type="bool"/>
</docblock>
<parameter name="key" optional="false" byreference="false" type="int"/>
<parameter name="value" optional="false" byreference="false" type="string"/>
</method>
</class>
|