Class Getopt

Description

Command-line options parsing class. This class is a derivate of PEAR Console_Getopt class with PEAR dependance removed for easier installation.

Located in /aclbit.php (line 2086)


	
			
Variable Summary
static mixed $errorMsg
Method Summary
static void doGetopt ( $args,  $short_options, [ $long_options = null])
static void getopts ( $args,  $short_options, [ $long_options = null])
static void isError ( $arg)
static mixed readPHPArgv ()
Variables
static mixed $errorMsg = NULL (line 2090)

Getopt error message;

  • access: public
Methods
static method doGetopt (line 2105)

The actual implementation of the argument parsing code.

  • access: public
static void doGetopt ( $args,  $short_options, [ $long_options = null])
  • $args
  • $short_options
  • $long_options
static method getopts (line 2097)

This function expects $args to start with the script name (POSIX-style).

Preserved for backwards compatibility.

  • see: getopt2()
  • access: public
static void getopts ( $args,  $short_options, [ $long_options = null])
  • $args
  • $short_options
  • $long_options
static method isError (line 2307)

Checks if the returned result of a function is an error. True if argument is === FALSE.

  • access: public
static void isError ( $arg)
  • $arg
static method readPHPArgv (line 2288)

Safely read the $argv PHP array across different PHP configurations.

Will take care on register_globals and register_argc_argv ini directives

  • return: the $argv PHP array or Getopt error if not registered
  • access: public
static mixed readPHPArgv ()

Documentation generated on Wed, 30 Apr 2008 08:38:21 +0200 by phpDocumentor 1.4.0