forked from JetBrains/phpstorm-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
judy.php
217 lines (190 loc) · 8.57 KB
/
judy.php
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?php
// Start of judy.
/**
* Class Judy.
* @link https://php.net/manual/en/class.judy.php
*/
class Judy implements ArrayAccess
{
/**
* Define the Judy Array as a Bitset with keys as Integer and Values as a Boolean.
* @link https://php.net/manual/en/class.judy.php#judy.constants.bitset
*/
public const BITSET = 1;
/**
* Define the Judy Array with key/values as Integer, and Integer only.
* @link https://php.net/manual/en/class.judy.php#judy.constants.int-to-int
*/
public const INT_TO_INT = 2;
/**
* Define the Judy Array with keys as Integer and Values of any type.
* @link https://php.net/manual/en/class.judy.php#judy.constants.int-to-mixed
*/
public const INT_TO_MIXED = 3;
/**
* Define the Judy Array with keys as a String and Values as Integer, and Integer only.
* @link https://php.net/manual/en/class.judy.php#judy.constants.string-to-int
*/
public const STRING_TO_INT = 4;
/**
* Define the Judy Array with keys as a String and Values of any type.
* @link https://php.net/manual/en/class.judy.php#judy.constants.string-to-mixed
*/
public const STRING_TO_MIXED = 5;
/**
* (PECL judy >= 0.1.1)<br/>
* Construct a new Judy object. A Judy object can be accessed like a PHP Array.
* @link https://php.net/manual/en/judy.construct.php
* @param int $judy_type <p>The Judy type to be used.</p>
*/
public function __construct($judy_type) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Destruct a Judy object.
* @link https://php.net/manual/en/judy.destruct.php
*/
public function __destruct() {}
/**
* (PECL judy >= 0.1.1)<br/>
* Locate the Nth index present in the Judy array.
* @link https://php.net/manual/en/judy.bycount.php
* @param int $nth_index <p>Nth index to return. If nth_index equal 1, then it will return the first index in the array.</p>
* @return int <p>Return the index at the given Nth position.</p>
*/
public function byCount($nth_index) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Count the number of elements in the Judy array.
* @link https://php.net/manual/en/judy.count.php
* @param int $index_start [optional] <p>Start counting from the given index. Default is first index.</p>
* @param int $index_end [optional] <p>Stop counting when reaching this index. Default is last index.</p>
* @return int <p>Return the number of elements.</p>
*/
public function count($index_start = 0, $index_end = -1) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Search (inclusive) for the first index present that is equal to or greater than the passed Index.
* @link https://php.net/manual/en/judy.first.php
* @param mixed $index [optional] <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
* @return mixed <p>Return the corresponding index in the array.</p>
*/
public function first($index = 0) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Search (inclusive) for the first absent index that is equal to or greater than the passed Index.
* @link https://php.net/manual/en/judy.firstempty.php
* @param mixed $index [optional] <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
* @return mixed <p>Return the corresponding index in the array.</p>
*/
public function firstEmpty($index = 0) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Free the entire Judy array.
* @link https://php.net/manual/en/judy.free.php
*/
public function free() {}
/**
* (PECL judy >= 0.1.1)<br/>
* Return an integer corresponding to the Judy type of the current object.
* @link https://php.net/manual/en/judy.gettype.php
* @return int <p>Return an integer corresponding to a Judy type.</p>
*/
public function getType() {}
/**
* (PECL judy >= 0.1.1)<br/>
* Search (inclusive) for the last index present that is equal to or less than the passed Index.
* @link https://php.net/manual/en/judy.last.php
* @param int|string $index [optional] <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
* @return mixed <p>Return the corresponding index in the array.</p>
*/
public function last($index = -1) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Search (inclusive) for the last absent index that is equal to or less than the passed Index.
* @link https://php.net/manual/en/judy.lastempty.php
* @param int|string $index [optional] <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
* @return mixed <p>Return the corresponding index in the array.</p>
*/
public function lastEmpty($index = -1) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Return the memory used by the Judy array.
* @link https://php.net/manual/en/judy.memoryusage.php
* @return int <p>Return the memory used in bytes.</p>
*/
public function memoryUsage() {}
/**
* (PECL judy >= 0.1.1)<br/>
* Search (exclusive) for the next index present that is greater than the passed Index.
* @link https://php.net/manual/en/judy.next.php
* @param mixed $index <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
* @return mixed <p>Return the corresponding index in the array.</p>
*/
public function next($index) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Search (exclusive) for the next absent index that is greater than the passed Index.
* @link https://php.net/manual/en/judy.nextempty.php
* @param int|string $index <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
* @return mixed <p>Return the corresponding index in the array.</p>
*/
public function nextEmpty($index) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Whether or not an offset exists.
* @link https://php.net/manual/en/judy.offsetexists.php
* @param mixed $offset <p>An offset to check for.</p>
* @return bool <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
*/
public function offsetExists($offset) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Returns the value at specified offset.
* @link https://php.net/manual/en/judy.offsetget.php
* @param mixed $offset <p>An offset to check for.</p>
* @return mixed <p>Can return all value types.</p>
*/
public function offsetGet($offset) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Assigns a value to the specified offset.
* @link https://php.net/manual/en/judy.offsetset.php
* @param mixed $offset <p>The offset to assign the value to.</p>
* @param mixed $value <p>The value to set.</p>
*/
public function offsetSet($offset, $value) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Unsets an offset.
* @link https://php.net/manual/en/judy.offsetunset.php
* @param mixed $offset <p>The offset to assign the value to.</p>
*/
public function offsetUnset($offset) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Search (exclusive) for the previous index present that is less than the passed Index.
* @link https://php.net/manual/en/judy.prev.php
* @param mixed $index <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
* @return mixed <p>Return the corresponding index in the array.</p>
*/
public function prev($index) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Search (exclusive) for the previous index absent that is less than the passed Index.
* @link https://php.net/manual/en/judy.prevempty.php
* @param mixed $index <p>The index can be an integer or a string corresponding to the index where to start the search.</p>
* @return mixed <p>Return the corresponding index in the array.</p>
*/
public function prevEmpty($index) {}
/**
* (PECL judy >= 0.1.1)<br/>
* Count the number of elements in the Judy array.<br/>
* This method is an alias of const count.
* @link https://php.net/manual/en/judy.size.php
* @param int $index_start [optional] <p>Start counting from the given index. Default is first index.</p>
* @param int $index_end [optional] <p>Stop counting when reaching this index. Default is last index.</p>
* @return int <p>Return the number of elements.</p>
*/
public function size($index_start = 0, $index_end = -1) {}
}
// End of judy.