helly Mon Feb 20 23:26:39 2006 UTC
Modified files:
/php-src/ext/reflection php_reflection.c
Log:
- Show dependencies in dump's too
http://cvs.php.net/viewcvs.cgi/php-src/ext/reflection/php_reflection.c?r1=1.209&r2=1.210&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.209
php-src/ext/reflection/php_reflection.c:1.210
--- php-src/ext/reflection/php_reflection.c:1.209 Mon Feb 20 23:01:27 2006
+++ php-src/ext/reflection/php_reflection.c Mon Feb 20 23:26:39 2006
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_reflection.c,v 1.209 2006/02/20 23:01:27 helly Exp $ */
+/* $Id: php_reflection.c,v 1.210 2006/02/20 23:26:39 helly Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -873,6 +873,41 @@
module->module_number, module->name,
(module->version == NO_VERSION_YET) ?
"<no_version>" : module->version);
+ if (module->deps) {
+ zend_module_dep* dep = module->deps;
+
+ string_printf(str, "\n - Dependencies {\n");
+
+ while(dep->name) {
+ string_printf(str, "%s Dependency [ %s (", indent,
dep->name);
+
+ switch(dep->type) {
+ case MODULE_DEP_REQUIRED:
+ string_write(str, "Required",
sizeof("Required") - 1);
+ break;
+ case MODULE_DEP_CONFLICTS:
+ string_write(str, "Conflicts",
sizeof("Conflicts") - 1);
+ break;
+ case MODULE_DEP_OPTIONAL:
+ string_write(str, "Optional",
sizeof("Optional") - 1);
+ break;
+ default:
+ string_write(str, "Error", sizeof("Error") -
1); /* shouldn't happen */
+ break;
+ }
+
+ if (dep->rel) {
+ string_printf(str, " %s", dep->rel);
+ }
+ if (dep->version) {
+ string_printf(str, " %s", dep->version);
+ }
+ string_write(str, ") ]\n", sizeof(") ]\n") - 1);
+ dep++;
+ }
+ string_printf(str, "%s }\n", indent);
+ }
+
{
string str_ini;
string_init(&str_ini);
@@ -4398,7 +4433,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.209
2006/02/20 23:01:27 helly Exp $");
+ php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.210
2006/02/20 23:26:39 helly Exp $");
php_info_print_table_end();
} /* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php