From 7218a70ff684e476a2fd4f0ed75a466de5f5c724 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Sun, 29 Jun 2003 12:21:58 +0000 Subject: ext_skel is no more, and ext_skel_ng is moving to PEAR::PECL_Gen --- scripts/ext_skel_ng/php_constant.php | 83 ------------------------------------ 1 file changed, 83 deletions(-) delete mode 100644 scripts/ext_skel_ng/php_constant.php (limited to 'scripts/ext_skel_ng/php_constant.php') diff --git a/scripts/ext_skel_ng/php_constant.php b/scripts/ext_skel_ng/php_constant.php deleted file mode 100644 index 4f377a963d..0000000000 --- a/scripts/ext_skel_ng/php_constant.php +++ /dev/null @@ -1,83 +0,0 @@ -name = $attr["name"]; - if (!$this->is_name($this->name)) { - $this->error[] = "'$attr[name]'is not a valid constant name"; - } - - $this->type = isset($attr["type"]) ? $this->is_type($attr["type"]) : "string"; - if (!in_array($this->type, array('int', 'float', 'string'))) { - $this->error[] = "'$attr[type]' is not a valid constant type, only int, float and string"; - } - - $this->value= $attr["value"]; - $this->desc = $desc; - } - - - static function c_code_header($name) { - return ""; - } - - function c_code() { - switch ($this->type) { - case "int": - return "REGISTER_LONG_CONSTANT(\"{$this->name}\", {$this->value}, 0);\n"; - - case "float": - return "REGISTER_DOUBLE_CONSTANT(\"{$this->name}\", {$this->value}, 0);\n"; - - case "string": - return "REGISTER_STRING_CONSTANT(\"{$this->name}\", \"$value\", ".strlen($this->value).", 0);\n"; - } - } - - static function c_code_footer() { - return ""; - } - - - - static function docbook_xml_header($name) { - return -" - $name constants - - - - name - value - descrpition - - - -"; - } - - function docbook_xml() { - return trim(" - - - {$this->name} - (integer) - - {$this->value} - {$this->desc} - -")."\n"; - } - - static function docbook_xml_footer() { - return -" - -
-"; - } - } - -?> -- cgit v1.2.1