1 #include "../../common.h" 2 3 #include "php_collection_ce.h" 4 #include "php_sequence_ce.h" 5 6 zend_class_entry *sequence_ce; 7 8 #define SEQUENCE_ABSTRACT_ME(name) PHP_ABSTRACT_ME(Sequence, name, arginfo_Sequence_##name) 9 php_ds_register_sequence()10void php_ds_register_sequence() 11 { 12 zend_class_entry ce; 13 14 zend_function_entry methods[] = { 15 SEQUENCE_ABSTRACT_ME(allocate) 16 SEQUENCE_ABSTRACT_ME(capacity) 17 SEQUENCE_ABSTRACT_ME(contains) 18 SEQUENCE_ABSTRACT_ME(filter) 19 SEQUENCE_ABSTRACT_ME(find) 20 SEQUENCE_ABSTRACT_ME(first) 21 SEQUENCE_ABSTRACT_ME(get) 22 SEQUENCE_ABSTRACT_ME(insert) 23 SEQUENCE_ABSTRACT_ME(join) 24 SEQUENCE_ABSTRACT_ME(last) 25 SEQUENCE_ABSTRACT_ME(map) 26 SEQUENCE_ABSTRACT_ME(merge) 27 SEQUENCE_ABSTRACT_ME(pop) 28 SEQUENCE_ABSTRACT_ME(push) 29 SEQUENCE_ABSTRACT_ME(reduce) 30 SEQUENCE_ABSTRACT_ME(remove) 31 SEQUENCE_ABSTRACT_ME(reverse) 32 SEQUENCE_ABSTRACT_ME(rotate) 33 SEQUENCE_ABSTRACT_ME(set) 34 SEQUENCE_ABSTRACT_ME(shift) 35 SEQUENCE_ABSTRACT_ME(slice) 36 SEQUENCE_ABSTRACT_ME(sort) 37 SEQUENCE_ABSTRACT_ME(unshift) 38 PHP_FE_END 39 }; 40 41 INIT_CLASS_ENTRY(ce, PHP_DS_NS(Sequence), methods); 42 43 sequence_ce = zend_register_internal_interface(&ce); 44 45 zend_class_implements(sequence_ce, 2, 46 collection_ce, 47 zend_ce_arrayaccess 48 ); 49 } 50