cvs: phpdoc /scripts/quickref cat.bat cat.php makefunclist.php rm.bat

From: Date: Sun, 03 May 2009 00:51:33 +0000
Subject: cvs: phpdoc /scripts/quickref cat.bat cat.php makefunclist.php rm.bat
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-3936@lists.php.net to get a copy of this message
kalle Sun May 3 00:51:33 2009 UTC Added files: /phpdoc/scripts/quickref cat.bat cat.php rm.bat Modified files: /phpdoc/scripts/quickref makefunclist.php Log: functions.js will now have class methods in the suggestions in the class::method pair's also added cat and rm batch files to make the makefile work on Windows http://cvs.php.net/viewvc.cgi/phpdoc/scripts/quickref/makefunclist.php?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/scripts/quickref/makefunclist.php diff -u phpdoc/scripts/quickref/makefunclist.php:1.7 phpdoc/scripts/quickref/makefunclist.php:1.8 --- phpdoc/scripts/quickref/makefunclist.php:1.7 Wed Dec 31 06:40:11 2008 +++ phpdoc/scripts/quickref/makefunclist.php Sun May 3 00:51:33 2009 @@ -15,9 +15,10 @@ +----------------------------------------------------------------------+ | Authors: Mitja Slenc <mitja@php.net> | | Gabor Hojtsy <goba@php.net> | + | Kalle Sommer Nielsen <kalle@php.net> | +----------------------------------------------------------------------+ - $Id: makefunclist.php,v 1.7 2008/12/31 06:40:11 philip Exp $ + $Id: makefunclist.php,v 1.8 2009/05/03 00:51:33 kalle Exp $ */ $XML_REF_ROOT = "../../en/reference/"; @@ -31,24 +32,63 @@ } closedir($dh); } else { - die("Unable to find phpdoc XML files"); + die("Unable to find phpdoc XML files\n"); } sort($FUNCTIONS); fwrite(fopen("funclist.txt", "w"), implode("\n", $FUNCTIONS)."\n"); +function get_filename($file, $ext = ".xml") { + if (!defined("PATHINFO_FILENAME")) { + $filename = pathinfo($file, PATHINFO_BASENAME); + return substr($filename, 0, strpos($filename, $ext)); + } + + return pathinfo($file, PATHINFO_FILENAME); +} + function get_function_files($dir) { global $FUNCTIONS; if ($dh = @opendir($dir . "/functions")) { while (($file = readdir($dh)) !== FALSE) { if (ereg("\\.xml\$", $file)) { - $FUNCTIONS[] = str_replace(array(".xml", "-"), array("", "_"), $file); + $FUNCTIONS[] = strtolower(str_replace(array(".xml", "-"), array("", "_"), $file)); } } closedir($dh); } else { - die("Unable to find phpdoc XML files in $dir folder"); + $dh = @opendir($dir . "/"); + + if ($ch === FALSE) { + die("Unable to find phpdoc XML files in $dir folder\n"); + } + + while (($file = readdir($dh)) !== FALSE) { + if (!ereg("\\.xml\$", $file)) { + continue; + } + + $class = get_filename($file); + + if (!is_dir($dir . "/" . $class . "/")) { + continue; + } + + $cdh = @opendir($dir . "/" . $class . "/"); + + if ($cdh === FALSE) { + continue; + } + + while (($method = readdir($cdh)) !== FALSE) { + if (!ereg("\\.xml\$", $method)) { + continue; + } + + $FUNCTIONS[] = strtolower($class . "::" . get_filename($method)); + } + } } } -?> +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/phpdoc/scripts/quickref/cat.bat?view=markup&rev=1.1 Index: phpdoc/scripts/quickref/cat.bat +++ phpdoc/scripts/quickref/cat.bat @echo OFF php cat.php %* http://cvs.php.net/viewvc.cgi/phpdoc/scripts/quickref/cat.php?view=markup&rev=1.1 Index: phpdoc/scripts/quickref/cat.php +++ phpdoc/scripts/quickref/cat.php <?php /* +----------------------------------------------------------------------+ | PHP Version 4 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2009 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_0.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Kalle Sommer Nielsen <kalle@php.net | +----------------------------------------------------------------------+ $Id: cat.php,v 1.1 2009/05/03 00:51:33 kalle Exp $ */ /* A damn simple "cat" program to fit the needs from the makefile for Windows */ if ($argc < 2) { die("Atleast one argument must be passed\n"); } array_shift($argv); foreach($argv as $file) { echo file_get_contents($file); } ?> http://cvs.php.net/viewvc.cgi/phpdoc/scripts/quickref/rm.bat?view=markup&rev=1.1 Index: phpdoc/scripts/quickref/rm.bat +++ phpdoc/scripts/quickref/rm.bat @echo OFF del %*

« previous php.doc.cvs (#3936) next »