summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2010-03-30 20:50:42 +0000
committerJohannes Schlüter <johannes@php.net>2010-03-30 20:50:42 +0000
commit347e2bce22c9240995b1d2b609c1bccde4f36740 (patch)
treedea298673e025e001afacbb6d063d49321ee4c87 /ext/reflection/php_reflection.c
parent005df4f01f39e00ed9f5d50fd8feadc29e13ee5c (diff)
downloadphp-git-347e2bce22c9240995b1d2b609c1bccde4f36740.tar.gz
Add ReflectionExtension::isTemporary() and ReflectionExtension::isPersistent().
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index d1f90e3455..66015707aa 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -5014,6 +5014,38 @@ ZEND_METHOD(reflection_extension, info)
}
/* }}} */
+/* {{{ proto public void ReflectionExtension::isPersistent()
+ Returns whether this extension is persistent */
+ZEND_METHOD(reflection_extension, isPersistent)
+{
+ reflection_object *intern;
+ zend_module_entry *module;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(module);
+
+ RETURN_BOOL(module->type == MODULE_PERSISTENT);
+}
+/* }}} */
+
+/* {{{ proto public void ReflectionExtension::isTemporary()
+ Returns whether this extension is temporary */
+ZEND_METHOD(reflection_extension, isTemporary)
+{
+ reflection_object *intern;
+ zend_module_entry *module;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(module);
+
+ RETURN_BOOL(module->type == MODULE_TEMPORARY);
+}
+
+
/* {{{ method tables */
static const zend_function_entry reflection_exception_functions[] = {
{NULL, NULL, NULL}
@@ -5376,6 +5408,8 @@ static const zend_function_entry reflection_extension_functions[] = {
ZEND_ME(reflection_extension, getClassNames, arginfo_reflection__void, 0)
ZEND_ME(reflection_extension, getDependencies, arginfo_reflection__void, 0)
ZEND_ME(reflection_extension, info, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_extension, isPersistent, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_extension, isTemporary, arginfo_reflection__void, 0)
{NULL, NULL, NULL}
};
/* }}} */