svn: /pear/pear-core/trunk/ make-command-xml.php

From: Date: Sun, 02 Aug 2009 11:51:56 +0000
Subject: svn: /pear/pear-core/trunk/ make-command-xml.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-56829@lists.php.net to get a copy of this message
dufuz Sun, 02 Aug 2009 11:51:56 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=286659 Log: Be more verbose. Changed paths: U pear/pear-core/trunk/make-command-xml.php Modified: pear/pear-core/trunk/make-command-xml.php =================================================================== --- pear/pear-core/trunk/make-command-xml.php 2009-08-02 11:47:26 UTC (rev 286658) +++ pear/pear-core/trunk/make-command-xml.php 2009-08-02 11:51:56 UTC (rev 286659) @@ -4,15 +4,20 @@ * Outputs the XML to stdout. */ +echo "Starting the XML generation process\n\n"; + // Name of the command, eg 'Remote' for Remote.php's XML output $dir = 'PEAR/Command/'; foreach (scandir($dir) as $file) { $file = explode('.', $file); if (isset($file[1]) && $file[1] === 'php' && $file[0] != 'Common') { + echo "Generating XML for " . $file[0] . " \n"; generateXML($file[0]); } } +echo "\nDone.\n"; + function generateXML($name) { $file = 'PEAR/Command/' . $name . '.php'; @@ -39,7 +44,12 @@ foreach($docs['options'] as $option => $opt_docs) { $option = htmlentities($option, ENT_QUOTES, 'UTF-8', false); $xml .= ' <'.$option.'>'."\n"; - $xml .= ' <shortopt>'.htmlentities($opt_docs['shortopt'], ENT_QUOTES, 'UTF-8', false)."</shortopt>\n"; + $xml .= ' <shortopt>'; + if (isset($opt_docs['shortopt'])) { + $xml .= htmlentities($opt_docs['shortopt'], ENT_QUOTES, 'UTF-8', false); + } + + $xml .= "</shortopt>\n"; $xml .= ' <doc>'.htmlentities($opt_docs['doc'], ENT_QUOTES, 'UTF-8', false)."</doc>\n"; if (isset($opt_docs['arg']) && $opt_docs['arg'] != '') { $xml .= ' <arg>'.htmlentities($opt_docs['arg'], ENT_QUOTES, 'UTF-8', false)."</arg>\n";

« previous php.pear.cvs (#56829) next »