\CommandLine

PARSE ARGUMENTS

This command line option parser supports any combination of three types of options (switches, flags and arguments) and returns a simple array.

[pfisher ~]$ php test.php --foo --bar=baz ["foo"] => true ["bar"] => "baz"

[pfisher ~]$ php test.php -abc ["a"] => true ["b"] => true ["c"] => true

[pfisher ~]$ php test.php arg1 arg2 arg3 [0] => "arg1" [1] => "arg2" [2] => "arg3"

[pfisher ~]$ php test.php plain-arg --foo --bar=baz --funny="spam=eggs" --also-funny=spam=eggs \

'plain arg 2' -abc -k=value "plain arg 3" --s="original" --s='overwrite' --s [0] => "plain-arg" ["foo"] => true ["bar"] => "baz" ["funny"] => "spam=eggs" ["also-funny"]=> "spam=eggs" [1] => "plain arg 2" ["a"] => true ["b"] => true ["c"] => true ["k"] => "value" [2] => "plain arg 3" ["s"] => "overwrite"

Summary

Methods
Properties
Constants
run_in_background()
is_process_running()
parseArgs()
_print_r()
getBoolean()
_print_r_output()
_exec()
$args
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$args

$args : 

Type

Methods

run_in_background()

run_in_background(  $Command,   $Priority) 

Parameters

$Command
$Priority

is_process_running()

is_process_running(  $PID) 

Parameters

$PID

parseArgs()

parseArgs(  $argv) 

Parameters

$argv

_print_r()

_print_r(  $data,   $space = "&nbsp;",   $weblibe = "<br>",   $return_data = false) 

Parameters

$data
$space
$weblibe
$return_data

getBoolean()

getBoolean(  $key,   $default = false) 

Parameters

$key
$default

_print_r_output()

_print_r_output(  $data,   $title = "Command") 

Parameters

$data
$title

_exec()

_exec(  $cmd,   $root = "",   $title) 

Parameters

$cmd
$root
$title