PHP Classes

File: Examples/common/usage.php

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

Contents

Class file image Download
<?php
   
/***
        This example demonstrates the usage of the "usage" attribute.
        It redefines the usage string for 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 "usage" attribute.
    </usage>

    <string name="string_value, sv" usage="-string_value keyword">
        Help for the -string_value parameter.
    </string>
</command>
END;

   
$cl = new CLParser ( $definitions ) ;