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

Class: CodeGen_Tools_Code

Source Location: /CodeGen-1.0.7/CodeGen/Tools/Code.php

Class Overview


Wrapper class for code block generation


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005-2008 Hartmut Holzgraefe

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 45]
Wrapper class for code block generation

all methods are actually static, the class is just needed for namespace emulation to conform with PEAR naming conventions



[ Top ]


Class Variables

$indentSteps =  4

[line 69]

Number of blanks to use for indent steps
  • Access: protected

Type:   int


[ Top ]

$language =  'c'

[line 51]

Programming language to generate code for
  • Access: protected

Type:   string


[ Top ]



Method Detail

block   [line 88]

string block( string $code, [int $indent = 1])

Generate simple indented codeblock
  • Return: formated code block

Parameters:

string   $code     code
int   $indent     indent level

[ Top ]

setIntentSteps   [line 76]

void setIntentSteps( int $indentSteps)

Setter for indentSteps property

Parameters:

int   $indentSteps     

[ Top ]

setLanguage   [line 58]

void setLanguage( string $language)

Setter for language property

Parameters:

string   $language     

[ Top ]

varblock   [line 101]

string varblock( string $code, [int $indent = 1])

Generate indented codeblock with variable declarations
  • Return: formated code block

Parameters:

string   $code     code
int   $indent     indent level

[ Top ]


Documentation generated on Mon, 27 Sep 2010 12:00:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.