summaryrefslogtreecommitdiff
path: root/Zend/zend_reflection_api.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-04-19 22:04:59 +0000
committerMarcus Boerger <helly@php.net>2005-04-19 22:04:59 +0000
commit67a226d910f4a154f48f6edccd46e5537608cbe9 (patch)
treea4497e70ca95c71301e7a77ba6068ade64d93b51 /Zend/zend_reflection_api.c
parentb8ac8eeca6767b4603d019d97f00d489161fca96 (diff)
downloadphp-git-67a226d910f4a154f48f6edccd46e5537608cbe9.tar.gz
- Add ReflectionProperty::getDocComment()
Diffstat (limited to 'Zend/zend_reflection_api.c')
-rw-r--r--Zend/zend_reflection_api.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c
index bf1000ea91..75e4037470 100644
--- a/Zend/zend_reflection_api.c
+++ b/Zend/zend_reflection_api.c
@@ -3455,6 +3455,21 @@ ZEND_METHOD(reflection_property, getDeclaringClass)
zend_reflection_class_factory(ref->ce, return_value TSRMLS_CC);
}
+/* {{{ proto public string ReflectionProperty::getDocComment()
+ Returns the doc comment for this property */
+ZEND_METHOD(reflection_property, getDocComment)
+{
+ reflection_object *intern;
+ property_reference *ref;
+
+ METHOD_NOTSTATIC_NUMPARAMS(0);
+ GET_REFLECTION_OBJECT_PTR(ref);
+ if (ref->prop->doc_comment) {
+ RETURN_STRINGL(ref->prop->doc_comment, ref->prop->doc_comment_len, 1);
+ }
+ RETURN_FALSE;
+}
+/* }}} */
/* {{{ proto public static mixed ReflectionExtension::export(string name [, bool return]) throws ReflectionException
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
ZEND_METHOD(reflection_extension, export)
@@ -3814,6 +3829,7 @@ static zend_function_entry reflection_property_functions[] = {
ZEND_ME(reflection_property, isDefault, NULL, 0)
ZEND_ME(reflection_property, getModifiers, NULL, 0)
ZEND_ME(reflection_property, getDeclaringClass, NULL, 0)
+ ZEND_ME(reflection_property, getDocComment, NULL, 0)
{NULL, NULL, NULL}
};