]> granicus.if.org Git - php/commitdiff
Show interfaces
authorMarcus Boerger <helly@php.net>
Sat, 2 Aug 2003 14:22:18 +0000 (14:22 +0000)
committerMarcus Boerger <helly@php.net>
Sat, 2 Aug 2003 14:22:18 +0000 (14:22 +0000)
Zend/zend_reflection_api.c
ext/reflection/php_reflection.c

index 8cd8e104e312ec633e143678f952c76885247c80..af5286c891849fe6d117a3f671cc83e32de0992a 100644 (file)
@@ -247,7 +247,14 @@ static void _class_string(string *str, zend_class_entry *ce, char *indent TSRMLS
        if (ce->parent) {
                string_printf(str, " extends %s", ce->parent->name);
        }
-       /* TBI: Interfaces */
+
+       if (ce->num_interfaces) {
+               int i;
+               string_printf(str, " implements %s", ce->interfaces[0]->name);
+               for (i = 1; i < ce->num_interfaces; ++i) {
+                       string_printf(str, ", %s", ce->interfaces[i]->name);
+               }
+       }
        string_printf(str, " ] {\n");
 
        /* The information where a class is declared is only available for user classes */
index 8cd8e104e312ec633e143678f952c76885247c80..af5286c891849fe6d117a3f671cc83e32de0992a 100644 (file)
@@ -247,7 +247,14 @@ static void _class_string(string *str, zend_class_entry *ce, char *indent TSRMLS
        if (ce->parent) {
                string_printf(str, " extends %s", ce->parent->name);
        }
-       /* TBI: Interfaces */
+
+       if (ce->num_interfaces) {
+               int i;
+               string_printf(str, " implements %s", ce->interfaces[0]->name);
+               for (i = 1; i < ce->num_interfaces; ++i) {
+                       string_printf(str, ", %s", ce->interfaces[i]->name);
+               }
+       }
        string_printf(str, " ] {\n");
 
        /* The information where a class is declared is only available for user classes */