Private Method Details |
createTemplate |
private void createTemplate( string $name, array $source )
|
|
creates a new template
creates all needed variables
|
Parameter |
|
string |
$name |
|
|
name of the template |
|
|
array |
$source |
|
|
data regarding the source of the template |
|
Returns |
void |
|
setTemplateType |
private void setTemplateType( string $template, string $type )
|
|
Sets the type of the Template
Template types can be STANDARD, CONDITION or ODDEVENThe type of the template can also be set using setAttribute()
|
Parameter |
|
string |
$template |
|
|
name of the template |
|
|
string |
$type |
|
|
type of the template |
|
Returns |
void |
See Also |
setAttribute() |
|
setConditionVar |
private void setConditionVar( string $template, string $conditionvar )
|
|
Sets the conditionvar of a condtion Template
The type of the template has to be condition
|
Parameter |
|
string |
$template |
|
|
name of the template |
|
|
string |
$conditionvar |
|
|
name of the conditionvariable |
|
Returns |
void |
See Also |
setTemplateType() |
|
addSubTemplate |
private void addSubTemplate( string $template, string $condition )
|
|
Adds a subtemplate for a condition or oddeven template
template type has to be condition or oddeven
|
Parameter |
|
string |
$template |
|
|
name of the template |
|
|
string |
$condition |
|
|
condition for this subtemplate |
|
Returns |
void |
See Also |
setTemplateType() |
|
createParser |
private void createParser( string $fname )
|
|
parse a template file and call the appropriate handlers
|
Parameter |
|
string |
$fname |
|
|
filename of the template |
|
Returns |
void |
|
startElementHandler |
private void startElementHandler( string $fname, string $tagname, array $attributes, string $line, integer $lineno )
|
|
handle a <patTemplate:...> start tag in template parser
|
Parameter |
|
string |
$fname |
|
|
name of the file where the tag was found (kind of parser id) |
|
|
string |
$tagname |
|
|
name of the start tag that was found |
|
|
array |
$attributes |
|
|
all attributes that were found |
|
|
string |
$line |
|
|
the complete line containing the tag |
|
|
integer |
$lineno |
|
|
lineno in the parse file (can be used for error messages |
|
Returns |
void |
|
endElementHandler |
private void endElementHandler( string $fname, string $tagname, string $line )
|
|
handle a </patTemplate:...> end tag in template parser
|
Parameter |
|
string |
$fname |
|
|
name of the file where the tag was found (kind of parser id) |
|
|
string |
$tagname |
|
|
name of the start tag that was found |
|
|
string |
$line |
|
|
the complete line containing the tag |
|
Returns |
void |
|
DataHandler |
private void DataHandler( string $fname, string $data )
|
|
handle a CDATA in template parser
|
Parameter |
|
string |
$fname |
|
|
name of the file where the tag was found (kind of parser id) |
|
|
string |
$data |
|
|
all cdata that was found |
|
Returns |
void |
|
addDependency |
private void addDependency( string $container, string $child )
|
|
Creates a dependeny between two templates
The Dependency tells a template, which templates have to be parsed before parsing the current template, because they are its children.
|
Parameter |
|
string |
$container |
|
|
the name of the template, that contains the other template |
|
|
string |
$child |
|
|
the child of the container |
|
Returns |
void |
|
loadTemplate |
private void loadTemplate( string $name )
|
|
loads a template
The template has to be defined using addTemplate() or addTemplates()
|
Parameter |
|
string |
$name |
|
|
name of the template that has to be loaded |
|
Returns |
void |
Deprecated |
2.4 2001/11/05 |
See Also |
addTemplate(), addTemplates() |
|
setPlainContent |
private void setPlainContent( string $template, string $content, [ string $sub ] )
|
|
sets the content of a template
This function should used, if a template is added using tags instead of defining it by a filename
|
Parameter |
|
string |
$template |
|
|
name of the template |
|
|
string |
$content |
|
|
the content that has to be set |
|
|
string |
$sub |
= >>""<< |
|
condition, for the subtemplate, if any |
|
Returns |
void |
|
parseStandardTemplate |
private void parseStandardTemplate( string $name, [ string $mode ] )
|
|
parses a standard template
Parses a template and stores the parsed content.mode can be "w" for write (delete already parsed content) or "a" for append (appends thenew parsed content to the already parsed content)
|
Parameter |
|
string |
$name |
|
|
name of the template |
|
|
string |
$mode |
= >>"w"<< |
|
mode for the parsing |
|
Returns |
void |
See Also |
parseTemplate(), parseIterativeTemplate() |
|
parseIterativeTemplate |
private void parseIterativeTemplate( string $name, string $mode )
|
|
parses an iterative template
Parses a template and stores the parsed content.mode can be "w" for write (delete already parsed content) or "a" for append (appends thenew parsed content to the already parsed content)
|
Parameter |
|
string |
$name |
|
|
name of the template |
|
|
string |
$mode |
|
|
mode for the parsing |
|
Returns |
void |
See Also |
parseTemplate(), parseStandardTemplate() |
|
getVars |
private array getVars( string $template )
|
|
get variables for a template
if the templates uses the attribute 'varscope' these vars will be fetched, too
|
Parameter |
|
string |
$template |
|
|
name of the template |
|
Returns |
array $vars array containign vars |
|
parseGlobals |
private void parseGlobals( string $name, string &$temp )
|
|
parses the global variables in a template
global variables are valid in all templates
|
Parameter |
|
string |
$name |
|
|
name of the template |
|
|
string |
&$temp |
|
|
content of the parsed Template |
|
Returns |
void |
See Also |
parseTemplate(), addGlobalVar(), addGlobalVars() |
|
stripUnusedVars |
private void stripUnusedVars( string $name, string &$template )
|
|
handles unset variables
either strips, comments, replaces or ignores them, depending on the unusedvars attribute
|
Parameter |
|
string |
$name |
|
|
name of the template |
|
|
string |
&$template |
|
|
content of the parsed Template |
|
Returns |
void |
See Also |
setAttribute() |
|
parseDependencies |
private void parseDependencies( string $name, string &$temp, string $mode )
|
|
parses dependencies of a template
parses child templates of a template and inserts their content
|
Parameter |
|
string |
$name |
|
|
name of the template |
|
|
string |
&$temp |
|
|
content of the parsed Template |
|
|
string |
$mode |
|
|
Warning: documentation is missing. |
|
Returns |
void |
See Also |
addDependency() |
|
getPlainTemplate |
private string getPlainTemplate( string $name )
|
|
returns an unparsed Template
If the template has not been loaded, it will be loaded.
|
Parameter |
|
string |
$name |
|
|
name of the template |
|
Returns |
string $content Unparsed content of the template |
Deprecated |
2.4 2001/11/05 |
See Also |
getPlainSubTemplate(), displayPlainTemplate() |
|
getPlainSubTemplate |
private string getPlainSubTemplate( string $name, string $sub )
|
|
returns an unparsed Subtemplate
The template of the template has to be set
|
Parameter |
|
string |
$name |
|
|
name of the template |
|
|
string |
$sub |
|
|
condition for the subtemplate |
|
Returns |
string $content Unparsed content of the template |
Deprecated |
2.4 2001/11/05 |
See Also |
getPlainTemplate(), displayPlainTemplate() |
|
displayPlainTemplate |
private void displayPlainTemplate( string $name )
|
|
displays an unparsed Template
If the template has not been loaded, it will be loaded.
|
Parameter |
|
string |
$name |
|
|
name of the template |
|
Returns |
void |
Deprecated |
2.4 2001/11/05 |
See Also |
getPlainTemplate(), getPlainSubTemplate() |
|
parseAttributes |
private array parseAttributes( string $string )
|
|
parsed attributes from a string
used for parsing <patTemplate> Tags
|
Parameter |
|
string |
$string |
|
|
string containing the attributes |
|
Returns |
array $array assotiative array, containing all attributes |
|
getTemplateContent |
private string getTemplateContent( string $name )
|
|
returns the plain content of a template
return value depends on iteration value
|
Parameter |
|
string |
$name |
|
|
name of the template |
|
Returns |
string $content plain content of the template |
|
getVar |
private mixed getVar( string $template )
|
|
get the value of a variable
|
Parameter |
|
string |
$template |
|
|
name of the template |
|
Returns |
mixed $value value of the variable / false if it doesn't exist |
|