xref: /ext-ds/src/php/classes/php_map_ce.h (revision 07801172)
1 #ifndef DS_MAP_CE_H
2 #define DS_MAP_CE_H
3 
4 #include "php.h"
5 #include "../../common.h"
6 #include "../arginfo.h"
7 
8 extern zend_class_entry *php_ds_map_ce;
9 
10 ARGINFO_OPTIONAL_ZVAL(                      Map___construct, values);
11 ARGINFO_LONG(                               Map_allocate, capacity);
12 ARGINFO_CALLABLE(                           Map_apply, callback);
13 ARGINFO_NONE_RETURN_LONG(                   Map_capacity);
14 ARGINFO_ZVAL_ZVAL(                          Map_put, key, value);
15 ARGINFO_ZVAL(                               Map_putAll, values);
16 ARGINFO_ZVAL_OPTIONAL_ZVAL(                 Map_get, key, default);
17 ARGINFO_DS_RETURN_DS(                       Map_intersect, map, Map, Map);
18 ARGINFO_ZVAL_OPTIONAL_ZVAL(                 Map_remove, key, default);
19 ARGINFO_ZVAL_RETURN_BOOL(                   Map_hasKey, key);
20 ARGINFO_ZVAL_RETURN_BOOL(                   Map_hasValue, value);
21 ARGINFO_DS_RETURN_DS(                       Map_diff, map, Map, Map);
22 ARGINFO_OPTIONAL_CALLABLE(                  Map_sort, comparator);
23 ARGINFO_OPTIONAL_CALLABLE_RETURN_DS(        Map_sorted, comparator, Map);
24 ARGINFO_OPTIONAL_CALLABLE(                  Map_ksort, comparator);
25 ARGINFO_OPTIONAL_CALLABLE_RETURN_DS(        Map_ksorted, comparator, Map);
26 ARGINFO_NONE_RETURN_DS(                     Map_keys, Set);
27 ARGINFO_NONE_RETURN_DS(                     Map_last, Pair);
28 ARGINFO_ZVAL_RETURN_DS(                     Map_merge, values, Map);
29 ARGINFO_NONE_RETURN_DS(                     Map_pairs, Sequence);
30 ARGINFO_NONE_RETURN_TYPE(                   Map_jsonSerialize, IS_MIXED);
31 ARGINFO_OPTIONAL_CALLABLE_RETURN_DS(        Map_filter, callback, Map);
32 ARGINFO_NONE_RETURN_DS(                     Map_first, Pair);
33 ARGINFO_CALLABLE_OPTIONAL_ZVAL(             Map_reduce, callback, initial);
34 ARGINFO_NONE(                               Map_reverse);
35 ARGINFO_NONE_RETURN_DS(                     Map_reversed, Map);
36 ARGINFO_LONG_RETURN_DS(                     Map_skip, position, Pair);
37 ARGINFO_CALLABLE_RETURN_DS(                 Map_map, callback, Map);
38 ARGINFO_LONG_OPTIONAL_LONG_RETURN_DS(       Map_slice, index, length, Map);
39 ARGINFO_NONE(                               Map_sum);
40 ARGINFO_ZVAL_RETURN_DS(                     Map_union, map, Map);
41 ARGINFO_NONE_RETURN_DS(                     Map_values, Sequence);
42 ARGINFO_DS_RETURN_DS(                       Map_xor, map, Map, Map);
43 ARGINFO_NONE_RETURN_OBJ(					Map_getIterator, Traversable);
44 
45 ARGINFO_ZVAL_RETURN_BOOL(                   Map_offsetExists, offset);
46 ARGINFO_OFFSET_GET(                         Map_offsetGet);
47 ARGINFO_OFFSET_SET(                         Map_offsetSet);
48 ARGINFO_OFFSET_UNSET(                       Map_offsetUnset);
49 
50 void php_ds_register_map();
51 
52 #endif
53