X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=reflection2php.php;h=37747be51c48702b537dce5e153ed74b953804e2;hp=e319bd4074cfbd3fb18bc73f026e7044f99d0ca3;hb=cc74cdc4ff1334afa39ff12001ba94309346df54;hpb=5bbb9fb7e8a807d3c06db151662b38daf3e26b60 diff --git a/reflection2php.php b/reflection2php.php index e319bd4..37747be 100755 --- a/reflection2php.php +++ b/reflection2php.php @@ -31,9 +31,11 @@ function c($n, $c) { if (!strlen($ext = $argv[1])) die(sprintf("Usage: %s \n", $argv[0])); +printf("getConstants() as $constant => $value) { - printf("const %s = %s;\n", $constant, $value); + printf("define('%s', '%s');\n", $constant, $value); } printf("\n"); @@ -111,7 +113,12 @@ foreach ($classes as $class) { } $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"); + } } }