From: Marcus Boerger Date: Fri, 24 Feb 2006 13:13:55 +0000 (+0000) Subject: - Functions can be deprecated too X-Git-Tag: RELEASE_1_2~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7dfafcbb84871c5777e97130977edbe95cd2ed52;p=php - Functions can be deprecated too - Add missing constant --- diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 14dd817b73..7dab6a3f50 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2417,9 +2417,9 @@ ZEND_METHOD(reflection_method, isStatic) } /* }}} */ -/* {{{ proto public bool ReflectionMethod::isDeprecated() - Returns whether this method is deprecated */ -ZEND_METHOD(reflection_method, isDeprecated) +/* {{{ proto public bool ReflectionFunction::isDeprecated() + Returns whether this function is deprecated */ +ZEND_METHOD(reflection_function, isDeprecated) { _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_DEPRECATED); } @@ -4261,6 +4261,7 @@ static zend_function_entry reflection_function_functions[] = { ZEND_ME(reflection_function, getNumberOfRequiredParameters, NULL, 0) ZEND_ME(reflection_function, getExtension, NULL, 0) ZEND_ME(reflection_function, getExtensionName, NULL, 0) + ZEND_ME(reflection_function, isDeprecated, NULL, 0) {NULL, NULL, NULL} }; @@ -4274,7 +4275,6 @@ static zend_function_entry reflection_method_functions[] = { ZEND_ME(reflection_method, isAbstract, NULL, 0) ZEND_ME(reflection_method, isFinal, NULL, 0) ZEND_ME(reflection_method, isStatic, NULL, 0) - ZEND_ME(reflection_method, isDeprecated, NULL, 0) ZEND_ME(reflection_method, isConstructor, NULL, 0) ZEND_ME(reflection_method, isDestructor, NULL, 0) ZEND_ME(reflection_method, getModifiers, NULL, 0) @@ -4437,6 +4437,8 @@ PHP_MINIT_FUNCTION(reflection) /* {{{ */ reflection_register_implement(reflection_function_ptr, reflector_ptr TSRMLS_CC); zend_declare_property_string(reflection_function_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); + REGISTER_REFLECTION_CLASS_CONST_LONG(function, "IS_STATIC", ZEND_ACC_DEPRECATED); + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionParameter", reflection_parameter_functions); _reflection_entry.create_object = reflection_objects_new; reflection_parameter_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);