summaryrefslogtreecommitdiff
path: root/scripts/ext_skel_ng/php_constant.php
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2003-02-27 17:43:39 +0000
committerSVN Migration <svn@php.net>2003-02-27 17:43:39 +0000
commit078bcec0997ad0e07b720c43cc9e6d0e046a75ab (patch)
tree36cb0f6be2ef078fe3374de8c087b93ecf82f812 /scripts/ext_skel_ng/php_constant.php
parentfd61f69077f6156ca71dde60ecfd9ed9765a02db (diff)
downloadphp-git-PHP-5.tar.gz
This commit was manufactured by cvs2svn to create branch 'PHP_5'.PHP-5
Diffstat (limited to 'scripts/ext_skel_ng/php_constant.php')
-rw-r--r--scripts/ext_skel_ng/php_constant.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/scripts/ext_skel_ng/php_constant.php b/scripts/ext_skel_ng/php_constant.php
deleted file mode 100644
index fd1ac36352..0000000000
--- a/scripts/ext_skel_ng/php_constant.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
- class php_constant extends php_element {
- function php_constant($name, $value, $type="string", $desc="") {
- $this->name = $name;
- $this->value= $value;
- $this->type = $type;
- $this->desc = $desc;
- }
-
- function c_code() {
- switch($this->type) {
- case "integer":
- 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";
- }
- }
-
- function docbook_xml() {
- return trim("
-<row>
- <entry>
- <constant id='constant".strtolower(str_replace("_","-",$this->name))."'>$name</constant>
- (<link linkend='language.types.integer'>integer</link>)
- </entry>
- <entry>{$this->value}</entry>
- <entry>{$this->desc}</entry>
-</row>
-")."\n";
- }
- }
-
-?> \ No newline at end of file