This is the compiler of templates: it converts a template into a php file.
| package |
jelix |
|---|---|
| subpackage |
jtpl |
__construct()
_callback(array $matches) : string
| Throws |
|
|---|
arraya matched item
stringthe corresponding php code of the tag (with php tag).
_getPlugin(string $type, string $name) : array|boolean
stringtype of plugin (function, modifier...)
stringthe plugin name
array|booleanan array containing the path of the plugin and the name of the plugin function, or false if not found
_parseFinal(string $string, array $allowed = array(), array $exceptchar = array(';'), boolean $splitArgIntoArray = false, $sep1 = ',', $sep2 = ',') : array|string
stringthe expression
arraylist of allowed php token
arraylist of forbidden characters
booleantrue: split the results on coma
array|string
_parseFunction(string $name, string $args) : string
stringthe name of the tag
stringthe content that follow the name in the tag
stringthe corresponding php instructions
_parseMeta( $args, $fct = '')
_parseVariable(string $expr) : string
.} or {@..}
stringthe content of the tag
stringthe corresponding php instruction
addMetaContent( $content)
compile(\jSelectorTpl $selector) : boolean
Store the result (a php content) into a cache file given by the selector.
booleantrue if ok
compileContent( $tplcontent)
compileString( $templatecontent, $cachefile, $userModifiers, $userFunctions, $md5, $header = '', $footer = '')
doError0( $err)
doError1( $err, $arg)
doError2( $err, $arg1, $arg2)
isInsideBlock(string $blockName, boolean $onlyUpper = false) : boolean
stringthe block to search
booleancheck only the upper block
booleantrue if it is inside the block
_literals :
_vartype :
_assignOp :
_op :
_inLocaleOk :
_allowedInVar :
_allowedInExpr :
_allowedAssign :
_allowedInForeach :
_excludedInVar :
_allowedConstants :
_pluginPath :
_modifier :
_blockStack :
_sourceFile :
_currentTag :
outputType :
trusted :
if it comes from an untrusted source, like a template uploaded by a user, you should set to false.
_userFunctions :