Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.3

Doc Bug #13902 User note that is a documentation problem
Submitted: 2008-05-14 18:57 UTC
From: wiesemann Assigned: cweiske
Status: Closed Package: Console_Getopt
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2008-05-14 18:57 UTC] wiesemann (Mark Wiesemann)
Manual page: package.console.console-getopt.php How about a method that breaks down the arguments to a simple associative array? Here is what I just go finished writing. function &condense_arguments($args) { $new_args_list=array(); foreach($args[0] as $arg) { $new_args_list[$arg[0]]=$arg[1]; } return $new_args_list; } At this time, I'm calling that as such.... $options=condense_arguments($gls['get_opt']->getopt2($args, $gls['arg_list'])); So given a script call like.... get_proxies.php -p Jason -u Argonauts ...I get a data structure like this. Array ( [p] => Jason [u] => Argonauts ) Would really make things nice. Or is there something I'm missing? Cheers

Comments

 [2008-05-14 18:58 UTC] wiesemann (Mark Wiesemann)
Requested by: bdkr@highsidecafe.com
 [2009-10-15 13:16 UTC] cweiske (Christian Weiske)
-Status: Open +Status: Closed -Assigned To: +Assigned To: cweiske
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.