summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2010-03-30 22:35:23 +0000
committerJohannes Schlüter <johannes@php.net>2010-03-30 22:35:23 +0000
commit26af57592665c7cbfdaa7cca1a69c72359e24425 (patch)
tree03da4ed1134397307fd856abf628b0694f774aa8 /sapi
parentb90455977661a364eea8f8de2e4eac76a606807f (diff)
downloadphp-git-26af57592665c7cbfdaa7cca1a69c72359e24425.tar.gz
Add ReflectionZendExtension class and --rz option to CLI
Diffstat (limited to 'sapi')
-rw-r--r--sapi/cli/php.1.in10
-rw-r--r--sapi/cli/php_cli.c24
2 files changed, 28 insertions, 6 deletions
diff --git a/sapi/cli/php.1.in b/sapi/cli/php.1.in
index 17346679ff..1aa1d9b794 100644
--- a/sapi/cli/php.1.in
+++ b/sapi/cli/php.1.in
@@ -295,6 +295,16 @@ Shows information about extension
.B name
.TP
.PD 0
+.B \-\-rzendextension
+.IR name
+.TP
+.PD 1
+.B \-\-rz
+.IR name
+Shows information about Zend extension
+.B name
+.TP
+.PD 0
.B \-\-rextinfo
.IR name
.TP
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 635445e92f..37564d1372 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -117,7 +117,8 @@ PHPAPI extern char *php_ini_scanned_files;
#define PHP_MODE_REFLECTION_CLASS 9
#define PHP_MODE_REFLECTION_EXTENSION 10
#define PHP_MODE_REFLECTION_EXT_INFO 11
-#define PHP_MODE_SHOW_INI_CONFIG 12
+#define PHP_MODE_REFLECTION_ZEND_EXTENSION 12
+#define PHP_MODE_SHOW_INI_CONFIG 13
const char HARDCODED_INI[] =
"html_errors=0\n"
@@ -165,10 +166,12 @@ static const opt_struct OPTIONS[] = {
{11, 1, "rclass"},
{12, 1, "re"},
{12, 1, "rextension"},
+ {13, 1, "rz"},
+ {13, 1, "rzendextension"},
#endif
- {13, 1, "ri"},
- {13, 1, "rextinfo"},
- {14, 0, "ini"},
+ {14, 1, "ri"},
+ {14, 1, "rextinfo"},
+ {15, 0, "ini"},
{'-', 0, NULL} /* end of args */
};
@@ -522,6 +525,7 @@ static void php_cli_usage(char *argv0)
" --rf <name> Show information about function <name>.\n"
" --rc <name> Show information about class <name>.\n"
" --re <name> Show information about extension <name>.\n"
+ " --rz <name> Show information about Zend extension <name>.\n"
#endif
" --ri <name> Show configuration for extension <name>.\n"
"\n"
@@ -1018,12 +1022,16 @@ int main(int argc, char *argv[])
behavior=PHP_MODE_REFLECTION_EXTENSION;
reflection_what = php_optarg;
break;
-#endif
case 13:
- behavior=PHP_MODE_REFLECTION_EXT_INFO;
+ behavior=PHP_MODE_REFLECTION_ZEND_EXTENSION;
reflection_what = php_optarg;
break;
+#endif
case 14:
+ behavior=PHP_MODE_REFLECTION_EXT_INFO;
+ reflection_what = php_optarg;
+ break;
+ case 15:
behavior = PHP_MODE_SHOW_INI_CONFIG;
break;
default:
@@ -1288,6 +1296,7 @@ int main(int argc, char *argv[])
case PHP_MODE_REFLECTION_FUNCTION:
case PHP_MODE_REFLECTION_CLASS:
case PHP_MODE_REFLECTION_EXTENSION:
+ case PHP_MODE_REFLECTION_ZEND_EXTENSION:
{
zend_class_entry *pce = NULL;
zval *arg, *ref;
@@ -1309,6 +1318,9 @@ int main(int argc, char *argv[])
case PHP_MODE_REFLECTION_EXTENSION:
pce = reflection_extension_ptr;
break;
+ case PHP_MODE_REFLECTION_ZEND_EXTENSION:
+ pce = reflection_zend_extension_ptr;
+ break;
}
MAKE_STD_ZVAL(arg);