d65effa1ed37733d3417192c4f976dfc532375d2
5 function re($file, $re, &$m=NULL) {
7 return preg_match($re, file_get_contents("$doc/$file"), $m);
11 return file_exists("$doc/$file");
13 function fg($path, &$g=NULL) {
15 return count($g = glob("$doc/$path"));
18 $doc = "/home/mike/cvs/phpdoc/en/reference/http";
19 $ext = new ReflectionExtension("http");
21 printf("Undocumented INI options:\n");
22 foreach ($ext->getINIEntries() as $name => $tmp) {
23 re("configuration.xml", "#<entry>$name</entry>#") or printf("\t%s (%s)\n", $name, $tmp);
27 printf("Undocumented constants:\n");
28 foreach ($ext->getConstants() as $name => $tmp) {
29 re("constants.xml", "#<constant>$name</constant>#") or printf("\t%s (%s)\n", $name, $tmp);
34 printf("Undocumented functions:\n");
35 foreach ($ext->getFunctions() as $func) {
36 /* @var $func ReflectionFunction */
37 fg(sprintf("functions/*/%s.xml", strtr($func->getName(),'_','-'))) or printf("\t%s()\n", $func->getName());
41 printf("Undocumented classes/methods:\n");
42 foreach ($ext->getClasses() as $class) {
43 if (substr($class->getName(), -strlen("Exception")) === "Exception") continue;
44 /* @var $class ReflectionClass */
45 fg(sprintf("%s.xml", $class->getName())) or printf(" %s\n", $class->getName());
46 foreach ($class->getMethods() as $meth) {
47 fg(sprintf("%s/%s.xml", $class->getName(), strtr(trim($meth->getName(),'_'),'_','-'))) or printf("\t%s::%s()\n", $class->getName(), $meth->getName());