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

Class: CodeGen_Command

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

Class Overview


Command wrapper class


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005-2008 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

$commandName =  '$command'

[line 60]

The command name

e.g. for usage output

  • Access: protected

Type:   string


[ Top ]

$extension =

[line 51]

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

Type:   object


[ Top ]



Method Detail

__construct (Constructor)   [line 67]

CodeGen_Command __construct( CodeGen_Extension $extension, [ $commandName = false])

Command constructor

Parameters:

object Extension   $extension   —  to work on
   $commandName   — 

[ Top ]

commandOptions   [line 112]

array commandOptions( )

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

[ Top ]

errorHandler   [line 194]

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 225]

void execute( object Extension $parser)

Create extension using the given parser

Parameters:

object Extension   $parser   —  parser

[ Top ]

showUsage   [line 146]

void showUsage( [string $message = false])

Show usage/help message

Parameters:

string   $message   —  optional error message to display

[ Top ]

showVersion   [line 133]

void showVersion( )

Show copyright and version info taken from extension class

[ Top ]

terminate   [line 174]

void terminate( string $msg)

Show error message and bailout

Parameters:

string   $msg   —  error message

[ Top ]


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