A generic PHP template engine, you can assign vars and they can be accessed via $this->VarName within the template. A cache layer can be added.
public __construct()
Returns new mvcViewEngineGeneric
public __isset($inVar)
Returns true if $inVar isset in _TplVars
public __get($inVar)
Re-directs var fetches to the TplVars private member, returns null if not found
public __set($inVar, [$inValue = null])
Allows template vars to be set outside of the method (not recommended!)
public __($inString, [$inLocale = null])
Translate $inString through the translate system
public escape($inVar, [$inCharset = 'UTF-8'])
Escapes the string $inVar, optionally using $inCharset (default is UTF-8)
public reset()
Resets object
public isModified()
Returns true if object has been modified
public setModified([$inStatus = true])
Set $_Modified to $inStatus
public getTplVars()
Returns $_TplVars
public setTplVars($inTplVars)
Set $_TplVars to $inTplVars
public getBuffer()
Returns $_Buffer
public setBuffer($inBuffer)
Set $_Buffer to $inBuffer
public getTemplateDirs()
Returns $_TemplateDirs
public setTemplateDir($inTemplateDir)
Either add or set template dir to $inTemplateDir, can be either a string or array of dirs
public assign($inVarName, [$inValue = null])
Assign item to template variables
public getTemplateVar($inVarName)
Returns a previously assigned template var, null if not found
public getTemplateVarByRef($inVarName)
Returns a previously assigned template var by reference null if not found
public assignByRef($inVarName, [$inValue = null])
Assign item to template variables by reference
public getTplVarCount()
Returns the number of vars assigned to the engine
public clearTplVars()
Unsets all vars assigned to the engine
public compile($inTemplate, [$inCacheID = null], [$inCompileID = null], [$inDisplay = false])
Compiles and either returns or displays the result
public display($inTemplate, [$inCacheID = null], [$inCompileID = null])
Executes the template and immediately displays the results
Tags: mvc, mvcviewenginegeneric,
mvc Articles