diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-05-25 12:47:43 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-05-25 12:47:43 +0300 |
commit | 27e7aea4124ffdecb6d40a2f5723e413a7b40562 (patch) | |
tree | 339f9ea525134eafc552fc7f7d4900b0dc656e1f /Zend/zend_interfaces.c | |
parent | 44ec732752a99334985759a569814bab05d95051 (diff) | |
download | php-git-27e7aea4124ffdecb6d40a2f5723e413a7b40562.tar.gz |
"Countable" interface is moved from SPL to Core
Diffstat (limited to 'Zend/zend_interfaces.c')
-rw-r--r-- | Zend/zend_interfaces.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 6bf4b15c67..e078c7f6b2 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -28,6 +28,7 @@ ZEND_API zend_class_entry *zend_ce_aggregate; ZEND_API zend_class_entry *zend_ce_iterator; ZEND_API zend_class_entry *zend_ce_arrayaccess; ZEND_API zend_class_entry *zend_ce_serializable; +ZEND_API zend_class_entry *zend_ce_countable; /* {{{ zend_call_method Only returns the returned zval if retval_ptr != NULL */ @@ -470,6 +471,13 @@ static int zend_implement_serializable(zend_class_entry *interface, zend_class_e } /* }}}*/ +/* {{{ zend_implement_countable */ +static int zend_implement_countable(zend_class_entry *interface, zend_class_entry *class_type) +{ + return SUCCESS; +} +/* }}}*/ + /* {{{ function tables */ const zend_function_entry zend_funcs_aggregate[] = { ZEND_ABSTRACT_ME(iterator, getIterator, NULL) @@ -517,6 +525,14 @@ const zend_function_entry zend_funcs_serializable[] = { ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT|ZEND_ACC_CTOR) ZEND_FE_END }; + +ZEND_BEGIN_ARG_INFO(arginfo_countable_count, 0) +ZEND_END_ARG_INFO() + +const zend_function_entry zend_funcs_countable[] = { + ZEND_ABSTRACT_ME(Countable, count, arginfo_countable_count) + ZEND_FE_END +}; /* }}} */ /* {{{ zend_register_interfaces */ @@ -533,6 +549,8 @@ ZEND_API void zend_register_interfaces(void) REGISTER_MAGIC_INTERFACE(arrayaccess, ArrayAccess); REGISTER_MAGIC_INTERFACE(serializable, Serializable); + + REGISTER_MAGIC_INTERFACE(countable, Countable); } /* }}} */ |