From 147840dd93d3209416230071c63ae98e07471bac Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Fri, 7 Jul 2006 11:55:23 +0000 Subject: [PATCH] MFH: ReflectionFunction::isDisabled() --- ext/reflection/php_reflection.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 7fb0eec78d7..f1ab8560bf9 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1414,6 +1414,19 @@ ZEND_METHOD(reflection_function, isUserDefined) } /* }}} */ +/* {{{ proto public bool ReflectionFunction::isDisabled() + Returns whether this function has been disabled or not */ +ZEND_METHOD(reflection_function, isDisabled) +{ + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC(reflection_function_ptr); + GET_REFLECTION_OBJECT_PTR(fptr); + RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION && fptr->internal_function.handler == zif_display_disabled_function); +} +/* }}} */ + /* {{{ proto public string ReflectionFunction::getFileName() Returns the filename of the file this function was declared in */ ZEND_METHOD(reflection_function, getFileName) @@ -4328,6 +4341,7 @@ static zend_function_entry reflection_function_abstract_functions[] = { static zend_function_entry reflection_function_functions[] = { ZEND_ME(reflection_function, export, arginfo_reflection_function_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) + ZEND_ME(reflection_function, isDisabled, NULL, 0) ZEND_ME(reflection_function, invoke, arginfo_reflection_function_invoke, 0) ZEND_ME(reflection_function, invokeArgs, arginfo_reflection_function_invokeArgs, 0) {NULL, NULL, NULL}