diff options
author | Marcus Boerger <helly@php.net> | 2003-09-04 15:57:25 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-09-04 15:57:25 +0000 |
commit | 4e7a782f3a0a6169af249da03c290d27ba046391 (patch) | |
tree | ba61d070e5fd69c97bb257b13fe7bc9177ec4084 /ext/reflection/php_reflection.c | |
parent | 421e2e9275809dfca38a260fbb4c26bff5f849d3 (diff) | |
download | php-git-4e7a782f3a0a6169af249da03c290d27ba046391.tar.gz |
Add reflection_class::getstaticproerties()
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 2df68c2923..6e4a93623b 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1659,6 +1659,21 @@ ZEND_METHOD(reflection_class, __construct) } /* }}} */ +/* {{{ proto public array Reflection_Class::getStaticProperties() + Returns an associative array containing all static property values of the class */ +ZEND_METHOD(reflection_class, getstaticproperties) +{ + zval *tmp_copy; + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(0); + GET_REFLECTION_OBJECT_PTR(ce); + array_init(return_value); + zend_hash_copy(Z_ARRVAL_P(return_value), ce->static_members, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *)); +} +/* }}} */ + /* {{{ proto public string Reflection_Class::toString() Returns a string representation */ ZEND_METHOD(reflection_class, tostring) @@ -2698,6 +2713,7 @@ static zend_function_entry reflection_class_functions[] = { ZEND_ME(reflection_class, newinstance, NULL, 0) ZEND_ME(reflection_class, getparentclass, NULL, 0) ZEND_ME(reflection_class, issubclassof, NULL, 0) + ZEND_ME(reflection_class, getstaticproperties, NULL, 0) {NULL, NULL, NULL} }; |