Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/reflection/php_reflection.c ext/reflection/tests/ReflectionExtension_isPersistant.phpt ext/reflection/tests/ReflectionExtension_isTemporary.phpt

2010-04-03 Thread Johannes Schlüter
On Sat, 2010-04-03 at 18:21 +0200, Johannes Schlüter wrote:
> dl()ed or loaded using the extension directive in php.ini, persistent is
> statically compiled-in.

eh I meant to write "dl()ed is temporary, persistent is statically
compiled-in or loaded using the extension directive in php.ini"

> Documentation is almost ready, will be committed once I convinced PhD to
> render it.

There I have it correct.

johannes


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/reflection/php_reflection.c ext/reflection/tests/ReflectionExtension_isPersistant.phpt ext/reflection/tests/ReflectionExtension_isTemporary.phpt

2010-04-03 Thread Johannes Schlüter
On Sat, 2010-04-03 at 14:53 +, Hannes Magnusson wrote:
> 2010/3/30 Johannes Schlüter :
> > johannes Tue, 30 Mar 2010 20:50:42 +
> >
> > Revision: http://svn.php.net/viewvc?view=revision&revision=297202
> >
> > Log:
> > Add ReflectionExtension::isTemporary() and 
> > ReflectionExtension::isPersistent().
> 
> Whattaheck is a temporary extension?
> dl()ed?

dl()ed or loaded using the extension directive in php.ini, persistent is
statically compiled-in.

Documentation is almost ready, will be committed once I convinced PhD to
render it.

johannes



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/reflection/php_reflection.c ext/reflection/tests/ReflectionExtension_isPersistant.phpt ext/reflection/tests/ReflectionExtension_isTemporary.phpt

2010-04-03 Thread Kalle Sommer Nielsen
2010/4/3 Hannes Magnusson :
> 2010/3/30 Johannes Schlüter :
>> johannes                                 Tue, 30 Mar 2010 20:50:42 +
>>
>> Revision: http://svn.php.net/viewvc?view=revision&revision=297202
>>
>> Log:
>> Add ReflectionExtension::isTemporary() and 
>> ReflectionExtension::isPersistent().
>
> Whattaheck is a temporary extension?
> dl()ed?
>
> -Hannes

Indeed, a persistent extension is an extension loaded via php.ini,
temporary is via dl() =)


-- 
regards,

Kalle Sommer Nielsen
ka...@php.net

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/reflection/php_reflection.c ext/reflection/tests/ReflectionExtension_isPersistant.phpt ext/reflection/tests/ReflectionExtension_isTemporary.phpt

2010-04-03 Thread Hannes Magnusson
2010/3/30 Johannes Schlüter :
> johannes                                 Tue, 30 Mar 2010 20:50:42 +
>
> Revision: http://svn.php.net/viewvc?view=revision&revision=297202
>
> Log:
> Add ReflectionExtension::isTemporary() and 
> ReflectionExtension::isPersistent().

Whattaheck is a temporary extension?
dl()ed?

-Hannes

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/trunk/ NEWS ext/reflection/php_reflection.c ext/reflection/tests/ReflectionExtension_isPersistant.phpt ext/reflection/tests/ReflectionExtension_isTemporary.phpt

2010-03-30 Thread Johannes Schlüter
johannes Tue, 30 Mar 2010 20:50:42 +

Revision: http://svn.php.net/viewvc?view=revision&revision=297202

Log:
Add ReflectionExtension::isTemporary() and ReflectionExtension::isPersistent().

Changed paths:
U   php/php-src/trunk/NEWS
U   php/php-src/trunk/ext/reflection/php_reflection.c
A   
php/php-src/trunk/ext/reflection/tests/ReflectionExtension_isPersistant.phpt
A   
php/php-src/trunk/ext/reflection/tests/ReflectionExtension_isTemporary.phpt

Modified: php/php-src/trunk/NEWS
===
--- php/php-src/trunk/NEWS  2010-03-30 20:48:37 UTC (rev 297201)
+++ php/php-src/trunk/NEWS  2010-03-30 20:50:42 UTC (rev 297202)
@@ -7,6 +7,9 @@
 - Added Tokyo Cabinet abstract DB support to ext/dba. (Michael Maclean)
 - Added Jenkins's one-at-a-time hash support to ext/hash. (Martin Jansen)
 - Added FNV-1 hash support to ext/hash. (Michael Maclean)
+- Added ReflectionExtension::isTemporary() and
+  ReflectionExtension::isPersistent(). (Johannes)
+
 - default_charset if not specified is now UTF-8 instead of ISO-8859-1. (Rasmus)

 ?? ??? 20??, PHP 5.3.3

Modified: php/php-src/trunk/ext/reflection/php_reflection.c
===
--- php/php-src/trunk/ext/reflection/php_reflection.c   2010-03-30 20:48:37 UTC 
(rev 297201)
+++ php/php-src/trunk/ext/reflection/php_reflection.c   2010-03-30 20:50:42 UTC 
(rev 297202)
@@ -5014,6 +5014,38 @@
 }
 /* }}} */

+/* {{{ 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 @@
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}
 };
 /* }}} */

Added: 
php/php-src/trunk/ext/reflection/tests/ReflectionExtension_isPersistant.phpt
===
--- 
php/php-src/trunk/ext/reflection/tests/ReflectionExtension_isPersistant.phpt
(rev 0)
+++ 
php/php-src/trunk/ext/reflection/tests/ReflectionExtension_isPersistant.phpt
2010-03-30 20:50:42 UTC (rev 297202)
@@ -0,0 +1,11 @@
+--TEST--
+ReflectionExtension::isPersistent()
+--FILE--
+isPersistent());
+?>
+==DONE==
+--EXPECT--
+bool(true)
+==DONE==


Property changes on: 
php/php-src/trunk/ext/reflection/tests/ReflectionExtension_isPersistant.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Added: 
php/php-src/trunk/ext/reflection/tests/ReflectionExtension_isTemporary.phpt
===
--- php/php-src/trunk/ext/reflection/tests/ReflectionExtension_isTemporary.phpt 
(rev 0)
+++ php/php-src/trunk/ext/reflection/tests/ReflectionExtension_isTemporary.phpt 
2010-03-30 20:50:42 UTC (rev 297202)
@@ -0,0 +1,11 @@
+--TEST--
+ReflectionExtension::isTemporary()
+--FILE--
+isTemporary());
+?>
+==DONE==
+--EXPECT--
+bool(false)
+==DONE==


Property changes on: 
php/php-src/trunk/ext/reflection/tests/ReflectionExtension_isTemporary.phpt
___
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php