API Joomla 1.5.26
Documentation des API du CMS Joomla en version 1.5
|
patTemplate_Compiler::_addToCode | ( | $ | line, |
$ | indent = 0 , |
||
$ | comment = null |
||
) |
add a line to the compiled code
public
string | line to add |
integer | indentation |
patTemplate_Compiler::_compileBuiltinConditions | ( | $ | template | ) |
compile built-in conditions
This will create the neccessary PHP code for:
private
string | template name |
patTemplate_Compiler::_compileConditionTemplate | ( | $ | template | ) |
compile a condition template
A condition template will be compiled into an 'switch/case' statement.
private
string | name of the template |
__first, __last
build switch statement
patTemplate_Compiler::_compileModuloTemplate | ( | $ | template | ) |
compile a modulo template
A modulo template will be compiled into a switch/case statement.
private
string | name of the template |
build switch statement
patTemplate_Compiler::_compileSimpleConditionTemplate | ( | $ | template | ) |
compile a simpleCondition template
A simpleCondition template will be compiled into an 'if' statement.
private
string | name of the template |
build switch statement
patTemplate_Compiler::_compileStandardTemplate | ( | $ | template | ) |
compile a standard template
private
string | name of the template |
patTemplate_Compiler::_getVar | ( | $ | template, |
$ | varname | ||
) |
function, used by the compiler to get a value of a variable
Checks, whether the value is locally or globally set
private
string | template |
string | variable name |
patTemplate_Compiler::_prepareCompiledTemplate | ( | $ | template | ) |
prepare a template for the compiler
private
string | template name |
patTemplate_Compiler::_templateToPHP | ( | $ | content, |
$ | template | ||
) |
build PHP code from a template
This will replace the variables in a template with PHP Code.
private
string | template content |
string | name of the template |
patTemplate_Compiler::compile | ( | $ | compileName = null | ) |
compile the currently loaded templates
public
string | name of the input (filename, shm segment, etc.) |
patTemplate_Compiler::compileTemplate | ( | $ | template | ) |
compile a template
public
string | name of the template |
check, if the template has been loaded and load it if necessary.
start the output
attributes
copyVars
check visibility
autoloop the template
fetch the variables
different templates have to be compiled differently
modulo template
simple condition template
condition template
standard template
remember this template
Références $i, $name, patErrorManager::isError(), patErrorManager::raiseWarning(), et type.
patTemplate_Compiler::displayParsedTemplate | ( | $ | name = null | ) |
display the compiled template
This is a replacement for patTemplate::displayParsedTemplate.
public
string | name of the template to display |
patTemplate_Compiler::patTemplate_Compiler | ( | $ | type = 'html' | ) |
constructor
Creates a new patTemplate Compiler
public
string | type of the templates, either 'html' or 'tex' |
Références $GLOBALS, $type, et patTemplate::patTemplate().
patTemplate_Compiler::$_compiledTemplates = array() |
patTemplate_Compiler::$_fp |