X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=scripts%2Fcheck_docs.php;h=c44eae73c33672f303a9a70b03c13347a09326c2;hp=d1e76ba68745f7a06a756d114fe9049061421af0;hb=21287ed3cfafa7f1d50ed74486288943b198006c;hpb=157f23df767f997fcb314ff2a46ef932842fab5a;ds=sidebyside diff --git a/scripts/check_docs.php b/scripts/check_docs.php index d1e76ba..c44eae7 100755 --- a/scripts/check_docs.php +++ b/scripts/check_docs.php @@ -15,28 +15,24 @@ function fg($path, &$g=NULL) { return count($g = glob("$doc/$path")); } - $ext = "http"; -$doc = "/home/mike/cvs/phpdoc/en/reference/$ext"; +$doc = "/home/mike/Development/src/php/phpdoc/en/trunk/reference/$ext"; $ref = new ReflectionExtension($ext); -$ini = $ref->getINIEntries(); -printf("Undocumented INI options (%d):\n", count($ini)); -foreach ($ini as $name => $tmp) { +printf("Undocumented INI options:\n"); +foreach ($ref->getINIEntries() as $name => $tmp) { re("configuration.xml", "#$name#") or printf("\t%s (%s)\n", $name, $tmp); } printf("\n"); -$flt = preg_grep("/^$ext\./", stream_get_filters()); -printf("Undocumented stream filters (%d):\n", count($flt)); -foreach ($flt as $filter) { +printf("Undocumented stream filters:\n"); +foreach (preg_grep("/^$ext\./", stream_get_filters()) as $filter) { fe(sprintf("streamfilters/%s.xml", substr($filter, 5))) or printf("\t%s\n", $filter); } printf("\n"); -$con = $ref->getConstants(); -printf("Undocumented constants (%d):\n", count($con)); -foreach ($con as $name => $tmp) { +printf("Undocumented constants:\n"); +foreach ($ref->getConstants() as $name => $tmp) { re("constants.xml", "#$name#") or printf("\t%s (%s)\n", $name, $tmp); } printf("\n"); @@ -67,7 +63,7 @@ foreach ($ref->getClasses() as $class) { $meth->getPrototype(); } catch (Exception $ex) { // if getPrototype throws an exception it's definitely not a method declared in an interface - $meth->isPrivate() or fg(sprintf("%s/%s.xml", $class->getName(), strtr(trim($meth->getName(),'_'),'_','-'))) or printf("\t%s::%s()\n", $class->getName(), $meth->getName()); + $meth->isPrivate() or fg(sprintf("%s/%s.xml", $class->getName(), strtr(trim($meth->getName(),'_'),'_','-'))) or printf("\t%s%s::%s()\n", $meth->isStatic()?'static ':'', $class->getName(), $meth->getName()); } } @@ -75,4 +71,21 @@ foreach ($ref->getClasses() as $class) { } printf("\n"); +printf("Undocumented request options:\n"); +if (is_file($file = dirname(__FILE__)."/../http_request_api.c")) { + if (preg_match_all("#(?:http_request_option\(request,\s*options,\s*\")(\w+)(?=\")#", file_get_contents($file), $match)) { + foreach ($match[1] as $opt) { + re("request-options.xml", "#\s*$opt#") or printf("\t%s\n", $opt); + } + printf("\n"); + printf("List of request option entities:\n"); + foreach ($match[1] as $opt) { + printf("\t%1\$s request option'>\n", $opt); + } + } +} else { + printf("\thttp_request_api.c not found\n"); +} +printf("\n"); + ?>