PHP_DocBlockGenerator
[ class tree: PHP_DocBlockGenerator ] [ index: PHP_DocBlockGenerator ] [ all elements ]

Class: PHP_DocBlockGenerator_Cli

Source Location: /PHP_DocBlockGenerator-1.1.2/PHP/DocBlockGenerator/Cli.php

Class Overview


Command Line Interface to create DocBlocks in a PHP file


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2007 Michel Corne

Methods


Inherited Variables

Inherited Methods


Class Details

[line 58]
Command Line Interface to create DocBlocks in a PHP file


[ Top ]


Method Detail

generate   [line 142]

void generate( )

The command line interface for DOS/Unix command

Primarily meant to be called by the "docblockgen" shell script. Processes the DOS/Unix command options/arguments, creates an instance of the class itself and starts the process. The default input file is the standard input and the default ouput file is the standard output. Exits with 0 on success, or dies and displays an error message on the CLI on failure.

 Example 1: Realigns DocBlock tags
 #docblockgen -A foo.php

 Example 2: Creates Docblocks for foo.php in docfoo.php with some specific Page tags
 #docblockgen -la -c PHP -a "John Foo" -e 'jfoo@mail.com' -y 1999-2007 foo.php docfoo.php

 Example 3: Displays the command usage
 #docblockgen -h
 This displays:
 
 Usage: docblockgen [options] [infile] [,outfile]
         docblockgen -A [infile] [,outfile]
 Options:
 -a --author             The author's name, e.g. "John Foo".
 -c --category           The category name, e.g. PHP.
                                See http://pear.php.net/packages.php.
 -e --email  The author's email address.
 -i --infile             The input PHP file to process. Default: STDIN.
 -l --license 
                                The license. Default: bsd.
 -o --outfile            The output file. Default: infile
                                or STDOUT if infile is STDIN.
 -p --package            The package name.
                                Default: the first 2 words of the class name.
 -u --link         The package link.
                                Default: http://pear.php.net/package/name.
 -v --version       The file version. Default: CVS keyword.
 -y --year               The copyright year. Default: the current year.
 -A --align                    Aligns existing DocBlock tags.
                                Other options are ignored.
 -h --help                     This help.
 Parameters:  [infile] [,outfile]
               The input and output files. See the -i and -o options.
 Note: Option values requiring space separated words, for example the author's
 name,must be enclosed with double-quotes.

  • See: scripts/gendocblock, scripts/gendocblock.bat
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:46:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.