Skip Navigation

UNL_DWT API Documentation

Developers, developers, developers, devel…

Class UNL_DWT_Generator

Description

The generator parses actual .dwt Dreamweaver Template files to create object relationship files which have member variables for editable regions within the dreamweaver templates.

Located in /UNL/DWT/Generator.php (line 32)

UNL_DWT
   |
   --UNL_DWT_Generator
Variable Summary
mixed $template
mixed $templates
mixed $_regions
Method Summary
void generateClasses ()
string generateClassName (string $filename)
string sanitizeTemplateName (string $filename)
string scanRegions (string $dwt)
void start ()
string _generateGetters (string $input)
string _generateSetters (string $input)
Variables
mixed $template (line 43)

Current template being output

mixed $templates (line 38)

Array of template names.

mixed $_regions (line 49)

Assoc array of template region names.

$_regions[$template] = array();

Inherited Variables

Inherited from UNL_DWT

UNL_DWT::$options
UNL_DWT::$__template
Methods
createTemplateList (line 121)

Create a list of dwts

void createTemplateList ()
generateClasses (line 152)

Generate the classes for templates in $this->templates

void generateClasses ()
generateClassName (line 189)

Generates the class name from a filename.

  • return: Sanitized filename prefixed with the class_prefix defined in the ini.
string generateClassName (string $filename)
  • string $filename: The filename of the template.
generateTemplates (line 86)

Generates .tpl files from .dwt

void generateTemplates ()
sanitizeTemplateName (line 204)

Cleans the template filename.

  • return: Sanitized template name
string sanitizeTemplateName (string $filename)
  • string $filename: Filename of the template
scanRegions (line 218)

Scans the .dwt for regions - all found are loaded into assoc array $this->_regions[$template].

  • return: derived template file.
string scanRegions (string $dwt)
  • string $dwt: Dreamweaver template file to scan.
start (line 73)

begins generation of template files

void start ()
_generateGetters (line 377)

Generate getter methods for class definition

string _generateGetters (string $input)
  • string $input: Existing class contents
_generateSetters (line 430)

Generate setter methods for class definition

string _generateSetters (string $input)
  • string $input: Existing class contents

Inherited Methods

Inherited From UNL_DWT

UNL_DWT::__construct()
UNL_DWT::debug()
UNL_DWT::debugLevel()
UNL_DWT::factory()
UNL_DWT::replaceRegions()
UNL_DWT::setOption()
UNL_DWT::toHtml()

Documentation generated on Wed, 12 Aug 2009 13:00:36 -0500 by phpDocumentor 1.4.2