cvs: ZendEngine2 / zend_reflection_api.c
| From: | Marcus Boerger | Date: | Thu, 04 Sep 2003 15:57:25 +0000 |
| Subject: | cvs: ZendEngine2 / zend_reflection_api.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1808@lists.php.net to get a copy of this message | ||
helly Thu Sep 4 11:57:25 2003 EDT
Modified files:
/ZendEngine2 zend_reflection_api.c
Log:
Add reflection_class::getstaticproerties()
Index: ZendEngine2/zend_reflection_api.c
diff -u ZendEngine2/zend_reflection_api.c:1.55 ZendEngine2/zend_reflection_api.c:1.56
--- ZendEngine2/zend_reflection_api.c:1.55 Tue Sep 2 20:38:13 2003
+++ ZendEngine2/zend_reflection_api.c Thu Sep 4 11:57:25 2003
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_reflection_api.c,v 1.55 2003/09/03 00:38:13 helly Exp $ */
+/* $Id: zend_reflection_api.c,v 1.56 2003/09/04 15:57:25 helly Exp $ */
#include "zend.h"
#include "zend_API.h"
#include "zend_default_classes.h"
@@ -1659,6 +1659,21 @@
}
/* }}} */
+/* {{{ 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 @@
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}
};