PHP Classes

File: Examples/common/help-text.php

Recommend this page to a friend!
  Classes of Christian Vigh   PHP Command Line Arguments Parser   Examples/common/help-text.php   Download  
File: Examples/common/help-text.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Command Line Arguments Parser
Parse and extract arguments from the command line
Author: By
Last change: Update of Examples/common/help-text.php
Date: 11 months ago
Size: 932 bytes


Class file image Download
        This example demonstrates the usage of the "help-text" attribute.
        It defines two parameters : -string_value1, with a help-text attribute, and
        -string_value2, whose help text is defined as tag contents.

        Simply specify the -help reserved parameter when runnning this script.
require_once ( dirname ( __FILE__ ) . '/../' ) ;

$definitions = <<<END
        Example script that demonstrates the usage of the "help-text" attribute.

    <string name="string_value1, sv1" help-text="Help text for the -string_value1 parameter, specified with the help-text attribute">
        Help for the string_value parameter (will never be displayed because the "help-text" attribute has been specified).

    <string name="string_value2, sv2">
        Help for the -string_value2 parameter.

$cl = new CLParser ( $definitions ) ;