PHP Class SimpleHelp, simpletest

Datei anzeigen Open project: simpletest/simpletest Class Usage Examples

Public Methods

Method Description
__construct ( string $overview = '' ) Sets up the top level explanation for the program.
explainFlag ( string/array $flags, string $explanation ) Adds the explanation for a group of flags that all have the same function.
render ( ) Generates the help text.

Private Methods

Method Description
longestFlag ( array $flag_sets ) Works out the longest flag for formatting purposes.
noDuplicateNewLines ( string $text ) Converts multiple new lines into a single new line.
renderFlag ( string $flag ) Generates the flag name including leading dashes.
renderFlagSet ( $flags, $explanation, $tab_stop ) Generates the text for a single flag and it's alternate flags.

Method Details

__construct() public method

Sets up the top level explanation for the program.
public __construct ( string $overview = '' )
$overview string Summary of program.

explainFlag() public method

Adds the explanation for a group of flags that all have the same function.
public explainFlag ( string/array $flags, string $explanation )
$flags string/array
$explanation string What that flag group does.

render() public method

Generates the help text.
public render ( )