helly Tue Jan 23 20:02:29 2007 UTC
Modified files:
/php-src/sapi/cli php.1.in php_cli.c
Log:
- Add --ri/--rextinfo
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php.1.in?r1=1.16&r2=1.17&diff_format=u
Index: php-src/sapi/cli/php.1.in
diff -u php-src/sapi/cli/php.1.in:1.16 php-src/sapi/cli/php.1.in:1.17
--- php-src/sapi/cli/php.1.in:1.16 Wed Jan 10 22:17:09 2007
+++ php-src/sapi/cli/php.1.in Tue Jan 23 20:02:29 2007
@@ -294,6 +294,16 @@
.IR name
Shows information about extension
.B name
+.TP
+.PD 0
+.B \-\-rextinfo
+.IR name
+.TP
+.PD 1
+.B \-\-ri
+.IR name
+Shows configuration for extension
+.B name
.SH FILES
.TP 15
.B php\-cli.ini
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.166&r2=1.167&diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.166 php-src/sapi/cli/php_cli.c:1.167
--- php-src/sapi/cli/php_cli.c:1.166 Mon Jan 1 09:29:36 2007
+++ php-src/sapi/cli/php_cli.c Tue Jan 23 20:02:29 2007
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_cli.c,v 1.166 2007/01/01 09:29:36 sebastian Exp $ */
+/* $Id: php_cli.c,v 1.167 2007/01/23 20:02:29 helly Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -105,6 +105,7 @@
#define PHP_MODE_REFLECTION_FUNCTION 8
#define PHP_MODE_REFLECTION_CLASS 9
#define PHP_MODE_REFLECTION_EXTENSION 10
+#define PHP_MODE_REFLECTION_EXT_INFO 11
#define HARDCODED_INI \
"html_errors=0\n" \
@@ -152,6 +153,8 @@
{11, 1, "rclass"},
{12, 1, "re"},
{12, 1, "rextension"},
+ {13, 1, "ri"},
+ {13, 1, "rextinfo"},
#endif
{'-', 0, NULL} /* end of args */
};
@@ -460,6 +463,7 @@
" --rf <name> Show information about
function <name>.\n"
" --rc <name> Show information about
class <name>.\n"
" --re <name> Show information about
extension <name>.\n"
+ " --ri <name> Show configuration for
extension <name>.\n"
"\n"
#endif
, prog, prog, prog, prog, prog, prog);
@@ -958,6 +962,10 @@
behavior=PHP_MODE_REFLECTION_EXTENSION;
reflection_what = php_optarg;
break;
+ case 13:
+ behavior=PHP_MODE_REFLECTION_EXT_INFO;
+ reflection_what = php_optarg;
+ break;
#endif
default:
break;
@@ -1265,6 +1273,22 @@
break;
}
+ case PHP_MODE_REFLECTION_EXT_INFO:
+ {
+ int len = strlen(reflection_what);
+ char *lcname =
zend_str_tolower_dup(reflection_what, len);
+ zend_module_entry *module;
+
+ if (zend_hash_find(&module_registry,
lcname, len+1, (void**)&module) == FAILURE) {
+ zend_printf("Extension '%s' not
present.\n", reflection_what);
+ exit_status = 1;
+ } else {
+ php_info_print_module(module
TSRMLS_CC);
+ }
+
+ efree(lcname);
+ break;
+ }
#endif /* reflection */
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php