cvs: pear /PECL_Gen Extension.php ExtensionParser.php package.xml /PECL_Gen/Element Test.php /PECL_Gen/Tools Getopt.php Platform.php
| From: | Hartmut Holzgraefe | Date: | Wed, 18 Feb 2004 21:42:15 +0000 |
| Subject: | cvs: pear /PECL_Gen Extension.php ExtensionParser.php package.xml /PECL_Gen/Element Test.php /PECL_Gen/Tools Getopt.php Platform.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-16650@lists.php.net to get a copy of this message | ||
hholzgra Wed Feb 18 16:42:15 2004 EDT
Modified files:
/pear/PECL_Gen Extension.php ExtensionParser.php package.xml
/pear/PECL_Gen/Element Test.php
/pear/PECL_Gen/Tools Getopt.php Platform.php
Log:
kill warnings, minor glitches and adopt to latest PHP 5 changes
(assignment to $this no longer allowed)
http://cvs.php.net/diff.php/pear/PECL_Gen/Extension.php?r1=1.19&r2=1.20&ty=u Index: pear/PECL_Gen/Extension.php diff -u pear/PECL_Gen/Extension.php:1.19 pear/PECL_Gen/Extension.php:1.20 --- pear/PECL_Gen/Extension.php:1.19 Mon Feb 2 13:04:08 2004 +++ pear/PECL_Gen/Extension.php Wed Feb 18 16:42:13 2004 @@ -16,7 +16,7 @@ // | Authors: Hartmut Holzgraefe <hholzgra@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Extension.php,v 1.19 2004/02/02 18:04:08 hholzgra Exp $ +// $Id: Extension.php,v 1.20 2004/02/18 21:42:13 hholzgra Exp $ // // {{{ includes @@ -49,7 +49,7 @@ * A class that generates PECL extension soure and documenation files * * @access public - * @version $Id: Extension.php,v 1.19 2004/02/02 18:04:08 hholzgra Exp $ + * @version $Id: Extension.php,v 1.20 2004/02/18 21:42:13 hholzgra Exp $ */ class PECL_Gen_Extension @@ -72,6 +72,16 @@ */ var $summary = "The unknown extension"; + + /** + * extension description + * + * @var string + * @access private + */ + var $description; + + /** * The license for this extension * @@ -199,6 +209,14 @@ var $testcases = array(); + /** + * phpinfo logo + * + * @var string + * @access private + */ + var $logo; + // }}} @@ -1130,7 +1148,7 @@ php_printf(\"%s\", (SG(request_info).request_uri)); } php_printf(\"?=%s\", ".($this->logo->id)."); - php_printf(\"' align={'right' alt='image' border='0'>\\n\"); + php_printf(\"' align='right' alt='image' border='0'>\\n\"); "; } @@ -1802,7 +1820,7 @@ */ function write_readme($dirpath) { - $config_option = isset($this->with['attr']) ? "--with" : "--enable"; + $config_option = isset($this->with['attr']) ? "--with-" : "--enable-"; $config_option.= $this->name; ob_start(); @@ -1852,7 +1870,7 @@ The extension provides the VisualStudio V6 project file - <?php echo $this->extname.".dsp" ?> + <?php echo $this->name.".dsp" ?> To compile the extension you open this file using VisualStudio, select the apropriate configuration for your installation http://cvs.php.net/diff.php/pear/PECL_Gen/ExtensionParser.php?r1=1.14&r2=1.15&ty=u Index: pear/PECL_Gen/ExtensionParser.php diff -u pear/PECL_Gen/ExtensionParser.php:1.14 pear/PECL_Gen/ExtensionParser.php:1.15 --- pear/PECL_Gen/ExtensionParser.php:1.14 Mon Feb 2 13:04:08 2004 +++ pear/PECL_Gen/ExtensionParser.php Wed Feb 18 16:42:13 2004 @@ -16,7 +16,7 @@ // | Authors: Hartmut Holzgraefe <hholzgra@php.net> | // +----------------------------------------------------------------------+ // -// $Id: ExtensionParser.php,v 1.14 2004/02/02 18:04:08 hholzgra Exp $ +// $Id: ExtensionParser.php,v 1.15 2004/02/18 21:42:13 hholzgra Exp $ // require_once "PECL/Gen/XmlParser.php"; @@ -531,8 +531,16 @@ function tagstart_test($attr) { - $test = new PECL_Gen_Element_Test($attr['name']); - if (PEAR::isError($test)) return $test; + $test = new PECL_Gen_Element_Test(); + + if (isset($attr["name"])) { + $err = $test->set_name($attr["name"]); + if (PEAR::isError($err)) { + return $err; + } + } else { + return $this->raiseError("name attribut for class missing"); + } $this->push_helper($test); } http://cvs.php.net/diff.php/pear/PECL_Gen/package.xml?r1=1.17&r2=1.18&ty=u Index: pear/PECL_Gen/package.xml diff -u pear/PECL_Gen/package.xml:1.17 pear/PECL_Gen/package.xml:1.18 --- pear/PECL_Gen/package.xml:1.17 Mon Feb 2 13:04:08 2004 +++ pear/PECL_Gen/package.xml Wed Feb 18 16:42:13 2004 @@ -32,7 +32,7 @@ </notes> <deps> - <dep type="php" rel="ge" version="5.0"/> + <dep type="php" rel="ge" version="5"/> <dep type="pkg" rel="ge" version="1.0.1">XML_Parser</dep> <dep type="pkg" rel="ge" version="1.0">Console_Getopt</dep> </deps> http://cvs.php.net/diff.php/pear/PECL_Gen/Element/Test.php?r1=1.3&r2=1.4&ty=u Index: pear/PECL_Gen/Element/Test.php diff -u pear/PECL_Gen/Element/Test.php:1.3 pear/PECL_Gen/Element/Test.php:1.4 --- pear/PECL_Gen/Element/Test.php:1.3 Sun Oct 12 09:29:13 2003 +++ pear/PECL_Gen/Element/Test.php Wed Feb 18 16:42:14 2004 @@ -16,7 +16,7 @@ // | Authors: Hartmut Holzgraefe <hholzgra@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Test.php,v 1.3 2003/10/12 13:29:13 hholzgra Exp $ +// $Id: Test.php,v 1.4 2004/02/18 21:42:14 hholzgra Exp $ // /** @@ -27,6 +27,16 @@ class PECL_Gen_Element_Test extends PECL_Gen_Element { + /** + * Constructor + * + * @access public + * @param string testfile basename + */ + function __construct() + { + } + /** * testfile basename * @@ -35,18 +45,32 @@ */ var $name = ""; - /** - * Constructor - * + /** + * Setter for testcase name + * * @access public - * @param string testfile basename - */ - function __construct($name) + * @return string value of + */ function set_name($name) { - if (! $this->is_name($name)) $this = $this->raise("'$name' is not a valid test case basename"); + if (! $this->is_name($name)) { + return $this->raise("'$name' is not a valid test case basename"); + } $this->name = $name; - $this->title = $name; + if (empty($this->title)) { + $this->title = $name; + } + } + + /** + * Getter for testcase name + * + * @access public + * @return string value of + */ + function get_name() + { + return $this->name; } /** @@ -275,13 +299,13 @@ function c_code($ext) { - // no real code is generated by the test cases + // no real code is generated by the test cases return ""; } function docbook_xml($ext) { - // no user documentation is needed for the test cases + // no user documentation is needed for the test cases return ""; } } http://cvs.php.net/diff.php/pear/PECL_Gen/Tools/Getopt.php?r1=1.3&r2=1.4&ty=u Index: pear/PECL_Gen/Tools/Getopt.php diff -u pear/PECL_Gen/Tools/Getopt.php:1.3 pear/PECL_Gen/Tools/Getopt.php:1.4 --- pear/PECL_Gen/Tools/Getopt.php:1.3 Sun Oct 12 09:29:15 2003 +++ pear/PECL_Gen/Tools/Getopt.php Wed Feb 18 16:42:15 2004 @@ -16,7 +16,7 @@ // | Authors: Hartmut Holzgraefe <hholzgra@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Getopt.php,v 1.3 2003/10/12 13:29:15 hholzgra Exp $ +// $Id: Getopt.php,v 1.4 2004/02/18 21:42:15 hholzgra Exp $ // require_once "Console/Getopt.php"; @@ -55,8 +55,6 @@ call_user_func($usage, $this->options->message); exit(3); } - - $this = $this->options; } } http://cvs.php.net/diff.php/pear/PECL_Gen/Tools/Platform.php?r1=1.4&r2=1.5&ty=u Index: pear/PECL_Gen/Tools/Platform.php diff -u pear/PECL_Gen/Tools/Platform.php:1.4 pear/PECL_Gen/Tools/Platform.php:1.5 --- pear/PECL_Gen/Tools/Platform.php:1.4 Sun Oct 12 09:29:15 2003 +++ pear/PECL_Gen/Tools/Platform.php Wed Feb 18 16:42:15 2004 @@ -16,7 +16,7 @@ // | Authors: Hartmut Holzgraefe <hholzgra@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Platform.php,v 1.4 2003/10/12 13:29:15 hholzgra Exp $ +// $Id: Platform.php,v 1.5 2004/02/18 21:42:15 hholzgra Exp $ // /** @@ -68,7 +68,7 @@ break; default: - $this = $this->raiseError("'$name' is not a supported platform"); + $this->error = $this->raiseError("'$name' is not a supported platform"); break(2); } }
http://cvs.php.net/diff.php/pear/PECL_Gen/Extension.php?r1=1.19&r2=1.20&ty=u Index: pear/PECL_Gen/Extension.php diff -u pear/PECL_Gen/Extension.php:1.19 pear/PECL_Gen/Extension.php:1.20 --- pear/PECL_Gen/Extension.php:1.19 Mon Feb 2 13:04:08 2004 +++ pear/PECL_Gen/Extension.php Wed Feb 18 16:42:13 2004 @@ -16,7 +16,7 @@ // | Authors: Hartmut Holzgraefe <hholzgra@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Extension.php,v 1.19 2004/02/02 18:04:08 hholzgra Exp $ +// $Id: Extension.php,v 1.20 2004/02/18 21:42:13 hholzgra Exp $ // // {{{ includes @@ -49,7 +49,7 @@ * A class that generates PECL extension soure and documenation files * * @access public - * @version $Id: Extension.php,v 1.19 2004/02/02 18:04:08 hholzgra Exp $ + * @version $Id: Extension.php,v 1.20 2004/02/18 21:42:13 hholzgra Exp $ */ class PECL_Gen_Extension @@ -72,6 +72,16 @@ */ var $summary = "The unknown extension"; + + /** + * extension description + * + * @var string + * @access private + */ + var $description; + + /** * The license for this extension * @@ -199,6 +209,14 @@ var $testcases = array(); + /** + * phpinfo logo + * + * @var string + * @access private + */ + var $logo; + // }}} @@ -1130,7 +1148,7 @@ php_printf(\"%s\", (SG(request_info).request_uri)); } php_printf(\"?=%s\", ".($this->logo->id)."); - php_printf(\"' align={'right' alt='image' border='0'>\\n\"); + php_printf(\"' align='right' alt='image' border='0'>\\n\"); "; } @@ -1802,7 +1820,7 @@ */ function write_readme($dirpath) { - $config_option = isset($this->with['attr']) ? "--with" : "--enable"; + $config_option = isset($this->with['attr']) ? "--with-" : "--enable-"; $config_option.= $this->name; ob_start(); @@ -1852,7 +1870,7 @@ The extension provides the VisualStudio V6 project file - <?php echo $this->extname.".dsp" ?> + <?php echo $this->name.".dsp" ?> To compile the extension you open this file using VisualStudio, select the apropriate configuration for your installation http://cvs.php.net/diff.php/pear/PECL_Gen/ExtensionParser.php?r1=1.14&r2=1.15&ty=u Index: pear/PECL_Gen/ExtensionParser.php diff -u pear/PECL_Gen/ExtensionParser.php:1.14 pear/PECL_Gen/ExtensionParser.php:1.15 --- pear/PECL_Gen/ExtensionParser.php:1.14 Mon Feb 2 13:04:08 2004 +++ pear/PECL_Gen/ExtensionParser.php Wed Feb 18 16:42:13 2004 @@ -16,7 +16,7 @@ // | Authors: Hartmut Holzgraefe <hholzgra@php.net> | // +----------------------------------------------------------------------+ // -// $Id: ExtensionParser.php,v 1.14 2004/02/02 18:04:08 hholzgra Exp $ +// $Id: ExtensionParser.php,v 1.15 2004/02/18 21:42:13 hholzgra Exp $ // require_once "PECL/Gen/XmlParser.php"; @@ -531,8 +531,16 @@ function tagstart_test($attr) { - $test = new PECL_Gen_Element_Test($attr['name']); - if (PEAR::isError($test)) return $test; + $test = new PECL_Gen_Element_Test(); + + if (isset($attr["name"])) { + $err = $test->set_name($attr["name"]); + if (PEAR::isError($err)) { + return $err; + } + } else { + return $this->raiseError("name attribut for class missing"); + } $this->push_helper($test); } http://cvs.php.net/diff.php/pear/PECL_Gen/package.xml?r1=1.17&r2=1.18&ty=u Index: pear/PECL_Gen/package.xml diff -u pear/PECL_Gen/package.xml:1.17 pear/PECL_Gen/package.xml:1.18 --- pear/PECL_Gen/package.xml:1.17 Mon Feb 2 13:04:08 2004 +++ pear/PECL_Gen/package.xml Wed Feb 18 16:42:13 2004 @@ -32,7 +32,7 @@ </notes> <deps> - <dep type="php" rel="ge" version="5.0"/> + <dep type="php" rel="ge" version="5"/> <dep type="pkg" rel="ge" version="1.0.1">XML_Parser</dep> <dep type="pkg" rel="ge" version="1.0">Console_Getopt</dep> </deps> http://cvs.php.net/diff.php/pear/PECL_Gen/Element/Test.php?r1=1.3&r2=1.4&ty=u Index: pear/PECL_Gen/Element/Test.php diff -u pear/PECL_Gen/Element/Test.php:1.3 pear/PECL_Gen/Element/Test.php:1.4 --- pear/PECL_Gen/Element/Test.php:1.3 Sun Oct 12 09:29:13 2003 +++ pear/PECL_Gen/Element/Test.php Wed Feb 18 16:42:14 2004 @@ -16,7 +16,7 @@ // | Authors: Hartmut Holzgraefe <hholzgra@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Test.php,v 1.3 2003/10/12 13:29:13 hholzgra Exp $ +// $Id: Test.php,v 1.4 2004/02/18 21:42:14 hholzgra Exp $ // /** @@ -27,6 +27,16 @@ class PECL_Gen_Element_Test extends PECL_Gen_Element { + /** + * Constructor + * + * @access public + * @param string testfile basename + */ + function __construct() + { + } + /** * testfile basename * @@ -35,18 +45,32 @@ */ var $name = ""; - /** - * Constructor - * + /** + * Setter for testcase name + * * @access public - * @param string testfile basename - */ - function __construct($name) + * @return string value of + */ function set_name($name) { - if (! $this->is_name($name)) $this = $this->raise("'$name' is not a valid test case basename"); + if (! $this->is_name($name)) { + return $this->raise("'$name' is not a valid test case basename"); + } $this->name = $name; - $this->title = $name; + if (empty($this->title)) { + $this->title = $name; + } + } + + /** + * Getter for testcase name + * + * @access public + * @return string value of + */ + function get_name() + { + return $this->name; } /** @@ -275,13 +299,13 @@ function c_code($ext) { - // no real code is generated by the test cases + // no real code is generated by the test cases return ""; } function docbook_xml($ext) { - // no user documentation is needed for the test cases + // no user documentation is needed for the test cases return ""; } } http://cvs.php.net/diff.php/pear/PECL_Gen/Tools/Getopt.php?r1=1.3&r2=1.4&ty=u Index: pear/PECL_Gen/Tools/Getopt.php diff -u pear/PECL_Gen/Tools/Getopt.php:1.3 pear/PECL_Gen/Tools/Getopt.php:1.4 --- pear/PECL_Gen/Tools/Getopt.php:1.3 Sun Oct 12 09:29:15 2003 +++ pear/PECL_Gen/Tools/Getopt.php Wed Feb 18 16:42:15 2004 @@ -16,7 +16,7 @@ // | Authors: Hartmut Holzgraefe <hholzgra@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Getopt.php,v 1.3 2003/10/12 13:29:15 hholzgra Exp $ +// $Id: Getopt.php,v 1.4 2004/02/18 21:42:15 hholzgra Exp $ // require_once "Console/Getopt.php"; @@ -55,8 +55,6 @@ call_user_func($usage, $this->options->message); exit(3); } - - $this = $this->options; } } http://cvs.php.net/diff.php/pear/PECL_Gen/Tools/Platform.php?r1=1.4&r2=1.5&ty=u Index: pear/PECL_Gen/Tools/Platform.php diff -u pear/PECL_Gen/Tools/Platform.php:1.4 pear/PECL_Gen/Tools/Platform.php:1.5 --- pear/PECL_Gen/Tools/Platform.php:1.4 Sun Oct 12 09:29:15 2003 +++ pear/PECL_Gen/Tools/Platform.php Wed Feb 18 16:42:15 2004 @@ -16,7 +16,7 @@ // | Authors: Hartmut Holzgraefe <hholzgra@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Platform.php,v 1.4 2003/10/12 13:29:15 hholzgra Exp $ +// $Id: Platform.php,v 1.5 2004/02/18 21:42:15 hholzgra Exp $ // /** @@ -68,7 +68,7 @@ break; default: - $this = $this->raiseError("'$name' is not a supported platform"); + $this->error = $this->raiseError("'$name' is not a supported platform"); break(2); } }