\patTemplate_Dump_XUL

Dumps templates as XUL, using PEAR::XML_XUL

The dump functionality is separated from the main class for performance reasons.

Summary

Methods
Properties
Constants
setTemplateReference()
displayHeader()
dumpGlobals()
dumpTemplates()
displayFooter()
_flattenVars()
_extractVars()
getName()
setParams()
getParam()
_addToTree()
_getTemplate()
$_tmpl
$_name
$_params
$_doc
$_root
$_templates
$_addedTemplates
$_vars
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$_tmpl

$_tmpl : object

reference to the patTemplate object that instantiated the module

Type

object

$_name

$_name : string

module name

This has to be set in the final module classes.

Type

string

$_params

$_params : array

module parameters

Type

array

$_doc

$_doc : 

Type

$_root

$_root : 

Type

$_templates

$_templates : 

Type

$_addedTemplates

$_addedTemplates : 

Type

$_vars

$_vars : 

Type

Methods

setTemplateReference()

setTemplateReference(  $tmpl) 

set a reference to the patTemplate object that instantiated the reader

Parameters

$tmpl

displayHeader()

displayHeader() 

display the header

dumpGlobals()

dumpGlobals(  $globals) 

dump the global variables

Parameters

$globals

dumpTemplates()

dumpTemplates(  $templates,   $vars) 

dump the templates

This method has to be implemented in the dumpers.

Parameters

$templates
$vars

displayFooter()

displayFooter() 

display the footer

_flattenVars()

_flattenVars(  $vars) : array

flatten the variables

This will convert the variable definitions to a one-dimensional array. If there are rows defined, they will be converted to a string where the values are seperated with commas.

Parameters

$vars

Returns

array —

flattened variables

_extractVars()

_extractVars(  $template) : array

extract all variables from a template

Parameters

$template

Returns

array —

array containing all variables

getName()

getName() : string

get the name of the module

Returns

string —

name of the module

setParams()

setParams(  $params,   $clear = false) 

sets parameters of the module

Parameters

$params
$clear

getParam()

getParam(  $name) : mixed

gets a parameter of the module

Parameters

$name

Returns

mixed —

value of the parameter

_addToTree()

_addToTree(  $name,   $tree) 

Parameters

$name
$tree

_getTemplate()

_getTemplate(  $name) 

Parameters

$name