cvs: phpdoc /scripts/docgen docgen.php

From: Date: Wed, 01 Oct 2008 17:34:28 +0000
Subject: cvs: phpdoc /scripts/docgen docgen.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2185@lists.php.net to get a copy of this message
philip Wed Oct 1 17:34:28 2008 UTC Modified files: /phpdoc/scripts/docgen docgen.php Log: Expand usage(), and hide getopt() warning http://cvs.php.net/viewvc.cgi/phpdoc/scripts/docgen/docgen.php?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/scripts/docgen/docgen.php diff -u phpdoc/scripts/docgen/docgen.php:1.2 phpdoc/scripts/docgen/docgen.php:1.3 --- phpdoc/scripts/docgen/docgen.php:1.2 Wed May 28 01:18:58 2008 +++ phpdoc/scripts/docgen/docgen.php Wed Oct 1 17:34:28 2008 @@ -16,7 +16,7 @@ | Authors: Felipe Pena <felipe@php.net> | +----------------------------------------------------------------------+ - $Id: docgen.php,v 1.2 2008/05/28 01:18:58 felipe Exp $ + $Id: docgen.php,v 1.3 2008/10/01 17:34:28 philip Exp $ */ if (!(extension_loaded('reflection') & extension_loaded('pcre'))) { @@ -50,12 +50,19 @@ ); function usage() { /* {{{ */ + $v = PHP_VERSION; print <<<USAGE - Usage: php docgen.php <options> - Examples: - -e date (all extension) - -f preg_replace (a function) - -c simplexmlelement -m xpath -m asxml (a class method) + Usage: + php docgen.php <options> + + Example options: + -e dom (an entire extension) + -f preg_replace (a single function) + -c simplexmlelement -m xpath -m asxml (a couple class methods) + + Notes: + Long options are supported with PHP 5.3.0+, and you use $v + Be sure the desired extension to document is available (compiled) into PHP Options: -c,--class -- class name @@ -713,7 +720,7 @@ 'method:' => 'm:' /* method */ ); -$options = getopt(implode($arropts), array_keys($arropts)); +$options = @getopt(implode($arropts), array_keys($arropts)); if (!$options) { usage(); @@ -724,7 +731,7 @@ switch ($opt) { case 'v': case 'version': - printf("%s\n", '$Revision: 1.2 $'); + printf("%s\n", '$Revision: 1.3 $'); break; case 'V': case 'verbose':

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