bjori           Fri Jul  7 11:53:54 2006 UTC

  Modified files:              
    /php-src/ext/reflection     php_reflection.c 
  Log:
  Added new method to see if function is disabled or not
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.239&r2=1.240&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.239 
php-src/ext/reflection/php_reflection.c:1.240
--- php-src/ext/reflection/php_reflection.c:1.239       Tue Jul  4 15:37:13 2006
+++ php-src/ext/reflection/php_reflection.c     Fri Jul  7 11:53:54 2006
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_reflection.c,v 1.239 2006/07/04 15:37:13 bjori Exp $ */
+/* $Id: php_reflection.c,v 1.240 2006/07/07 11:53:54 bjori Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1429,6 +1429,19 @@
 }
 /* }}} */
 
+/* {{{ 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)
@@ -4399,6 +4412,7 @@
 
 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}
@@ -4818,7 +4832,7 @@
        php_info_print_table_start();
        php_info_print_table_header(2, "Reflection", "enabled");
 
-       php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.239 
2006/07/04 15:37:13 bjori Exp $");
+       php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.240 
2006/07/07 11:53:54 bjori Exp $");
 
        php_info_print_table_end();
 } /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to