[Solar-svn] Revision 2570

pmjones at solarphp.com pmjones at solarphp.com
Thu Jul 5 12:50:08 CDT 2007


Solar_Console_Getopt: [CHG] To maintain some level of compat with original Sungrazr_Console_Getopt 'auto-assign-shorts', params are 'optional' by default.


Modified: trunk/Solar/Console/Getopt.php
===================================================================
--- trunk/Solar/Console/Getopt.php	2007-07-05 17:42:46 UTC (rev 2569)
+++ trunk/Solar/Console/Getopt.php	2007-07-05 17:50:07 UTC (rev 2570)
@@ -69,7 +69,7 @@
      * : (string) When the option is present, does it take a parameter?  If so,
      *   the param can be "required" every time, or be "optional". If empty, no
      *   parameter for the option will be recognized (the option's value will be
-     *   boolean true).
+     *   boolean true).  Default is 'optional'.
      * 
      * `value`
      * : (mixed) The default value for the option parameter, if any.  This way,
@@ -80,7 +80,9 @@
      *   of some sort.
      * 
      * `filters`
-     * : (array) An array of filters to apply to the parameter value.
+     * : (array) An array of filters to apply to the parameter value.  This can
+     *   be a single filter (`array('validateInt')`), or a series of filters
+     *   (`array('validateInt', array('validateRange', -10, +10)`).
      * 
      * @var array
      * 
@@ -88,7 +90,7 @@
     protected $_default = array(
         'long'    => null,
         'short'   => null,
-        'param'   => null,
+        'param'   => 'optional',
         'value'   => null,
         'descr'   => null,
         'require' => false,




More information about the Solar-svn mailing list