Public Member Functions | |
PHPTAL_Template ($file, $repository=false, $cache_dir=false) | |
setOutputMode ($mode) | |
setAll ($hash) | |
set ($name, $value) | |
setRef ($name, &$value) | |
& | getContext () |
setContext (&$ctx) | |
setCacheManager (&$mngr) | |
& | getCacheManager () |
setTranslator (&$tr) | |
& | getTranslator () |
fileExists () | |
isValid () | |
addSourceResolver (&$resolver) | |
addInputFilter (&$filter) | |
addOutputFilter (&$filter) | |
realpath ($file=false) | |
setEncoding ($enc) | |
getEncoding () | |
setParent (&$tpl) | |
_prepare () | |
_generateCode () | |
_loadCachedCode () | |
_cacheCode () | |
_load () | |
execute () | |
_process () | |
_translate ($key) | |
_setTranslateVar ($name, $value) | |
Public Attributes | |
$_ctx | |
$_code | |
$_codeFile | |
$_funcName | |
$_sourceFile | |
$_error = false | |
$_repository = false | |
$_cacheDir = false | |
$_parent = false | |
$_parentPath = false | |
$_prepared = false | |
$_cacheManager | |
$_outputMode = PHPTAL_XHTML | |
$_inputFilters | |
$_outputFilters | |
$_resolvers | |
$_locator | |
$_headers = false | |
$_translator | |
$_encoding = 'UTF-8' |
|
Template object constructor.
Definition at line 59 of file Template.php. |
|
Cache generated php code. private Definition at line 439 of file Template.php. Referenced by _load(). |
|
Generate php code from template source private
Definition at line 394 of file Template.php. Referenced by _load(). |
|
Load or generate php code. private Definition at line 454 of file Template.php. References _cacheCode(), _generateCode(), and _loadCachedCode(). Referenced by _process(), and PHPTAL_Macro::_process(). |
|
Load cached php code private Definition at line 428 of file Template.php. Referenced by _load(). |
|
Prepare template execution. private Definition at line 374 of file Template.php. References PHPTAL_MARK. Referenced by execute(), and PHPTAL_Macro::execute(). |
|
Really load/parse/execute the template and process output filters. This method is called by cache manager to retrieve the real template execution value. IMPORTANT : The result is post-filtered here !
Reimplemented in PHPTAL_Macro. Definition at line 513 of file Template.php. References $i, $res, _load(), and PHPTAL_POST_FILTER. |
|
Definition at line 553 of file Template.php. References _setTranslateVar(), and name. Referenced by _setTranslateVar(). |
|
Definition at line 548 of file Template.php. References _translate(). Referenced by _translate(). |
|
Add filter to this template input filters list.
Definition at line 257 of file Template.php. References addInputFilter(). Referenced by addInputFilter(). |
|
Add an output filter to this template output filters list.
Definition at line 268 of file Template.php. References addOutputFilter(). Referenced by addOutputFilter(). |
|
Add a source resolver to the template.
Definition at line 246 of file Template.php. References addSourceResolver(). Referenced by addSourceResolver(). |
|
Execute template with prepared context. This method execute the template file and returns the produced string.
Reimplemented in PHPTAL_Macro. Definition at line 490 of file Template.php. References _prepare(). |
|
Test if the template file exists.
Definition at line 203 of file Template.php. References isValid(). |
|
Retrieve the cache manager used in this template.
Definition at line 173 of file Template.php. |
|
Retrieve template context object.
Definition at line 142 of file Template.php. |
|
Retrieve the template result encoding.
Definition at line 344 of file Template.php. |
|
The translator used by this template.
Definition at line 193 of file Template.php. |
|
Test if the template resource exists.
Definition at line 213 of file Template.php. References $i. Referenced by fileExists(), and realpath(). |
|
Retrieve the source template real path. This method store its result internally if no $file attribute is specified (work on template internals). If a file name is specified, this method will try to locate it exploring current path (PWD), the current template location, the repository and parent template location.
Definition at line 289 of file Template.php. References $i, isValid(), and realpath(). Referenced by realpath(). |
|
Set a template context value.
Definition at line 121 of file Template.php. Referenced by set(). |
|
Replace template context with specified hashtable.
Definition at line 110 of file Template.php. References setAll(). Referenced by setAll(). |
|
Set the cache manager to use for Template an Macro calls.
Definition at line 163 of file Template.php. References setCacheManager(). Referenced by setCacheManager(). |
|
Set the template context object.
Definition at line 152 of file Template.php. References setContext(). Referenced by setContext(). |
|
Set the template result encoding. Changing this encoding will change htmlentities behaviour. Example: $tpl->setEncoding('ISO-8859-1"); See http://fr2.php.net/manual/en/function.htmlentities.php for a list of supported encodings.
Definition at line 334 of file Template.php. References setEncoding(). Referenced by setEncoding(). |
|
Set template ouput type. Default output is XHTML, so you'll have to call this method only for specific xml documents with PHPTAL_XML parameter.
Definition at line 100 of file Template.php. References setOutputMode(). Referenced by setOutputMode(). |
|
Set the called template. (internal) package Definition at line 358 of file Template.php. References setParent(). Referenced by setParent(). |
|
Set a template context value by reference.
Definition at line 132 of file Template.php. References name, and setRef(). Referenced by setRef(). |
|
Set the I18N implementation to use in this template.
Definition at line 183 of file Template.php. References setTranslator(). Referenced by setTranslator(). |
|
Definition at line 33 of file Template.php. |
|
Definition at line 37 of file Template.php. |
|
Definition at line 27 of file Template.php. |
|
Definition at line 28 of file Template.php. |
|
Definition at line 26 of file Template.php. |
|
Definition at line 50 of file Template.php. |
|
Definition at line 31 of file Template.php. |
|
Definition at line 29 of file Template.php. |
|
Definition at line 46 of file Template.php. |
|
Definition at line 41 of file Template.php. |
|
Definition at line 44 of file Template.php. |
|
Definition at line 42 of file Template.php. |
|
Definition at line 39 of file Template.php. |
|
Definition at line 34 of file Template.php. |
|
Definition at line 35 of file Template.php. |
|
Definition at line 36 of file Template.php. |
|
Definition at line 32 of file Template.php. |
|
Definition at line 43 of file Template.php. |
|
Definition at line 30 of file Template.php. |
|
Definition at line 48 of file Template.php. |