-foreach (array_slice($_SERVER['argv'], 1) as $f) {
- if (mf($f, $m)) {
- printf("<h1>%s</h1>\n", basename($f));
- foreach ($m[1] as $i => $p) {
- printf("<h2 id=\"%s\">%s</h2>\n%s\n", $m[4][$i], $p, ff($m[3][$i]));
+foreach (array_slice($_SERVER['argv'], 1) as $fp) {
+ foreach (glob($fp) as $f) {
+
+ if (mf($f, $m)) {
+ e("\nAnalyzing %s\n", basename($f));
+ printf("<h1>%s</h1>\n", basename($f));
+ foreach ($m[1] as $i => $p) {
+ e("Documenting $p\n");
+ if ($o = preg_match('/^(.*), (.*)$/', $m[4][$i], $n)) {
+ if ($n[2] == '__construct') {
+ printf("<h2 id=\"%s\" class=\"o\">%s</h2>\n", $n[1], $n[1]);
+ }
+ }
+ printf("<h%d id=\"%s\">%s</h%d>\n%s\n",
+ $o?3:2, $o?$n[1].'_'.$n[2]:$m[4][$i], $p, $o?3:2, ff($m[3][$i]));
+ }
+ print "<hr noshade>\n";