PHP Класс SimpleHelp, simpletest

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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

explainFlag() публичный Метод

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() публичный Метод

Generates the help text.
public render ( )