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

Class: CodeGen_Command

Source Location: /CodeGen-1.0.3/CodeGen/Command.php

Class Overview


Command wrapper class


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005 Hartmut Holzgraefe

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 44]
Command wrapper class

This class wraps up the functionality needed for the command line script.



[ Top ]


Class Variables

$extension =

[line 51]

The extension the command class is going to work on
  • Access: protected

Type:   object


[ Top ]



Method Detail

__construct (Constructor)   [line 58]

CodeGen_Command __construct( CodeGen_Extension $extension)

Command constructor

Parameters:

object Extension   $extension   —  to work on

[ Top ]

commandOptions   [line 91]

array commandOptions( )

Define the available command line options
  • Return: the available short and long options

[ Top ]

errorHandler   [line 170]

void errorHandler( int $errno, string $errstr, string $errfile, int $errline)

Error handler callback

Parameters:

int   $errno   —  error level number
string   $errstr   —  error message
string   $errfile   —  source file
int   $errline   —  source line

[ Top ]

execute   [line 201]

void execute( object Extension $parser)

Create extension using the given parser

Parameters:

object Extension   $parser   —  parser

[ Top ]

showUsage   [line 124]

void showUsage( [string $message = false])

Show usage/help message

Parameters:

string   $message   —  optional error message to display

[ Top ]

showVersion   [line 111]

void showVersion( )

Show copyright and version info taken from extension class

[ Top ]

terminate   [line 150]

void terminate( string $msg)

Show error message and bailout

Parameters:

string   $msg   —  error message

[ Top ]


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