cvs: pear /CodeGen_PECL/PECL ExtensionParser.php /CodeGen_PECL/PECL/Element Ini.php /CodeGen_PECL/docs/examples phpini.xml
| From: | Hartmut Holzgraefe | Date: | Sun, 21 Aug 2005 19:26:52 +0000 |
| Subject: | cvs: pear /CodeGen_PECL/PECL ExtensionParser.php /CodeGen_PECL/PECL/Element Ini.php /CodeGen_PECL/docs/examples phpini.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-34201@lists.php.net to get a copy of this message | ||
hholzgra Sun Aug 21 15:26:52 2005 EDT
Added files:
/pear/CodeGen_PECL/docs/examples phpini.xml
Modified files:
/pear/CodeGen_PECL/PECL ExtensionParser.php
/pear/CodeGen_PECL/PECL/Element Ini.php
Log:
<phpini> stuff fixed, test/example added
http://cvs.php.net/diff.php/pear/CodeGen_PECL/PECL/ExtensionParser.php?r1=1.28&r2=1.29&ty=u
Index: pear/CodeGen_PECL/PECL/ExtensionParser.php
diff -u pear/CodeGen_PECL/PECL/ExtensionParser.php:1.28
pear/CodeGen_PECL/PECL/ExtensionParser.php:1.29
--- pear/CodeGen_PECL/PECL/ExtensionParser.php:1.28 Sat Aug 13 14:43:08 2005
+++ pear/CodeGen_PECL/PECL/ExtensionParser.php Sun Aug 21 15:26:42 2005
@@ -15,7 +15,7 @@
* @author Hartmut Holzgraefe <hartmut@php.net>
* @copyright 2005 Hartmut Holzgraefe
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: ExtensionParser.php,v 1.28 2005/08/13 18:43:08 hholzgra Exp $
+ * @version CVS: $Id: ExtensionParser.php,v 1.29 2005/08/21 19:26:42 hholzgra Exp $
* @link http://pear.php.net/package/CodeGen
*/
@@ -530,19 +530,14 @@
// php.ini settings are stored in modul-global variables
$global = new CodeGen_PECL_Element_Global;
- $err = $global->setName($ini->name);
+ $err = $global->setName($ini->getName());
if (PEAR::isError($err)) {
return $err;
}
- $err = $global->setType($ini->c_type);
+ $err = $global->setType($ini->getType());
if (PEAR::isError($err)) {
return $err;
}
- $err = $global->setValue($ini->value);
- if (PEAR::isError($err)) {
- return $err;
- }
-
$err = $this->extension->addGlobal($global);
return $err;
http://cvs.php.net/diff.php/pear/CodeGen_PECL/PECL/Element/Ini.php?r1=1.2&r2=1.3&ty=u
Index: pear/CodeGen_PECL/PECL/Element/Ini.php
diff -u pear/CodeGen_PECL/PECL/Element/Ini.php:1.2 pear/CodeGen_PECL/PECL/Element/Ini.php:1.3
--- pear/CodeGen_PECL/PECL/Element/Ini.php:1.2 Tue Jul 26 05:16:04 2005
+++ pear/CodeGen_PECL/PECL/Element/Ini.php Sun Aug 21 15:26:48 2005
@@ -15,7 +15,7 @@
* @author Hartmut Holzgraefe <hartmut@php.net>
* @copyright 2005 Hartmut Holzgraefe
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Ini.php,v 1.2 2005/07/26 09:16:04 hholzgra Exp $
+ * @version CVS: $Id: Ini.php,v 1.3 2005/08/21 19:26:48 hholzgra Exp $
* @link http://pear.php.net/package/CodeGen
*/
@@ -97,23 +97,31 @@
{
switch ($type) {
case "bool":
- $this->onupdate = "OnUpdateBool";
$this->cType = "zend_bool";
+ if (!$this->onupdate) {
+ $this->onupdate = "OnUpdateBool";
+ }
return true;
case "int":
- $this->onupdate = "OnUpdateLong";
$this->cType = "long";
+ if (!$this->onupdate) {
+ $this->onupdate = "OnUpdateLong";
+ }
return true;
case "float":
- $this->onupdate = "OnUpdateReal";
$this->cType = "double";
+ if (!$this->onupdate) {
+ $this->onupdate = "OnUpdateReal";
+ }
return true;
case "string":
- $this->onupdate = "OnUpdateString";
$this->cType = "char *";
+ if (!$this->onupdate) {
+ $this->onupdate = "OnUpdateString";
+ }
return true;
default:
@@ -130,7 +138,7 @@
*/
function getType()
{
- return $this->type;
+ return $this->cType;
}
http://cvs.php.net/co.php/pear/CodeGen_PECL/docs/examples/phpini.xml?r=1.1&p=1
Index: pear/CodeGen_PECL/docs/examples/phpini.xml
+++ pear/CodeGen_PECL/docs/examples/phpini.xml
<?xml version="1.0" ?>
<extension name="phpini" version="0.9.0">
<phpini name="foo" type="int" value="42"/>
<test>
<code>
echo ini_get("phpini.foo")."\n";
ini_set("phpini.foo", "23")."\n";
echo ini_get("phpini.foo")."\n";
</code>
<result>
42
23
</result>
</test>
</extension>