diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-02-23 22:07:26 +0100 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-02-23 22:07:26 +0100 |
commit | 8fcb305db0081dacd8e8ad0583da5ecc6c6837dc (patch) | |
tree | 928fc44fde692835bca9dd304ebcb17cdd710ac8 /inc/cliopts.php | |
parent | 4d5954c8d1f8bcc5450f8cf70d8139cf5a1e697d (diff) | |
parent | 5d873dd4ce31c79403a01ac0e40ff148be282592 (diff) | |
download | rpg-8fcb305db0081dacd8e8ad0583da5ecc6c6837dc.tar.gz rpg-8fcb305db0081dacd8e8ad0583da5ecc6c6837dc.tar.bz2 |
Merge remote-tracking branch 'origin/master' into diff_navigation
Conflicts:
inc/html.php
Diffstat (limited to 'inc/cliopts.php')
-rw-r--r-- | inc/cliopts.php | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/inc/cliopts.php b/inc/cliopts.php index 9cea686a2..3eac72e5b 100644 --- a/inc/cliopts.php +++ b/inc/cliopts.php @@ -74,9 +74,9 @@ class Doku_Cli_Opts { /** * <?php ?> * @see http://www.sitepoint.com/article/php-command-line-1/3 - * @param string executing file name - this MUST be passed the __FILE__ constant - * @param string short options - * @param array (optional) long options + * @param string $bin_file executing file name - this MUST be passed the __FILE__ constant + * @param string $short_options short options + * @param array $long_options (optional) long options * @return Doku_Cli_Opts_Container or Doku_Cli_Opts_Error */ function & getOptions($bin_file, $short_options, $long_options = null) { @@ -233,12 +233,12 @@ class Doku_Cli_Opts { * Parse short option * * @param string $arg Argument - * @param string[] $short_options Available short options + * @param string $short_options Available short options * @param string[][] &$opts * @param string[] &$args * * @access private - * @return void + * @return void|Doku_Cli_Opts_Error */ function _parseShortOption($arg, $short_options, &$opts, &$args) { $len = strlen($arg); @@ -324,7 +324,7 @@ class Doku_Cli_Opts { * @param string[] &$args * * @access private - * @return void|PEAR_Error + * @return void|Doku_Cli_Opts_Error */ function _parseLongOption($arg, $long_options, &$opts, &$args) { @list($opt, $opt_arg) = explode('=', $arg, 2); @@ -402,7 +402,7 @@ class Doku_Cli_Opts { * Will take care on register_globals and register_argc_argv ini directives * * @access public - * @return mixed the $argv PHP array or PEAR error if not registered + * @return array|Doku_Cli_Opts_Error the $argv PHP array or PEAR error if not registered */ function readPHPArgv() { global $argv; @@ -421,10 +421,19 @@ class Doku_Cli_Opts { return $argv; } + /** + * @param $code + * @param $msg + * @return Doku_Cli_Opts_Error + */ function raiseError($code, $msg) { return new Doku_Cli_Opts_Error($code, $msg); } + /** + * @param $obj + * @return bool + */ function isError($obj) { return is_a($obj, 'Doku_Cli_Opts_Error'); } |