PHP Classes

File: Examples/common/value-text.php

Recommend this page to a friend!
  Classes of Christian Vigh   PHP Command Line Arguments Parser   Examples/common/value-text.php   Download  
File: Examples/common/value-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/value-text.php
Date: 2 years ago
Size: 682 bytes
 

Contents

Class file image Download
<?php
   
/***
        This example demonstrates the usage of the "value-text" attribute.
        It redefines the text shown for the type of value of the -string_value parameter.

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

   
$definitions = <<<END
<command>
    <usage>
        Example script that demonstrates the usage of the "value-text" attribute.
    </usage>

    <string name="string_value, sv" value-text="english noun">
        Help for the -string_value parameter. Provide an English noun as the parameter value.
    </string>
</command>
END;

   
$cl = new CLParser ( $definitions ) ;