projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fixed struct init
[m6w6/ext-http]
/
reflection2php.php
diff --git
a/reflection2php.php
b/reflection2php.php
index e319bd4074cfbd3fb18bc73f026e7044f99d0ca3..37747be51c48702b537dce5e153ed74b953804e2 100755
(executable)
--- a/
reflection2php.php
+++ b/
reflection2php.php
@@
-31,9
+31,11
@@
function c($n, $c) {
if (!strlen($ext = $argv[1]))
die(sprintf("Usage: %s <ext>\n", $argv[0]));
if (!strlen($ext = $argv[1]))
die(sprintf("Usage: %s <ext>\n", $argv[0]));
+printf("<?php\n\n");
+
$ext = new ReflectionExtension($ext);
foreach ($ext->getConstants() as $constant => $value) {
$ext = new ReflectionExtension($ext);
foreach ($ext->getConstants() as $constant => $value) {
- printf("
const %s = %s
;\n", $constant, $value);
+ printf("
define('%s', '%s')
;\n", $constant, $value);
}
printf("\n");
}
printf("\n");
@@
-111,7
+113,12
@@
foreach ($classes as $class) {
}
$ps[] = $p1;
}
}
$ps[] = $p1;
}
- printf("%s) {\n\t\t}\n", implode(", ", $ps));
+ printf("%s)", implode(", ", $ps));
+ if ($m->isAbstract()) {
+ printf(";\n\n");
+ } else {
+ printf(" {\n\t\t}\n\n");
+ }
}
}
}
}