Class Template (namespace Nette\Templates)
Template.
Object | --Template
Implements interfaces:
Public Method Summary | |
---|---|
void |
add
(string $name, mixed $value)
Adds new template parameter.
|
Template |
addTemplate
(string $name, string|Template $file)
Adds new template as parameter.
|
static ICacheStorage |
|
string |
getFile
()
Returns the path to the template file.
|
array |
getParams
()
Returns array of all parameters.
|
void |
registerFilter
(callback $callback)
Registers callback as template filter.
|
void |
registerHelper
(string $name, callback $callback)
Registers callback as template helper.
|
void |
registerHelperLoader
(callback $callback)
Registers callback as template helpers loader.
|
void |
render
()
Renders template to output.
|
static void |
setCacheStorage
($storage)
Set cache storage.
|
void |
setFile
(string $file)
Sets the path to the template file.
|
void |
setTranslator
([$translator =
NULL ])
Sets translate adapter.
|
Template |
subTemplate
(string $file, [$params =
NULL ])
Creates subtemplate.
|
SimpleXMLElement |
toXml
()
Converts to SimpleXML. (experimental)
|
mixed |
__call
(string $name, array $args)
Call a template helper. Do not call directly.
|
& mixed |
__get
(string $name)
Returns a template parameter. Do not call directly.
|
bool |
__isset
(string $name)
Determines whether parameter is defined. Do not call directly.
|
void |
__set
(string $name, mixed $value)
Sets a template parameter. Do not call directly.
|
string |
__toString
(bool 0)
Renders template to string.
|
void |
__unset
(string $name)
Removes a template parameter. Do not call directly.
|
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary | ||||
---|---|---|---|---|
static int | $cacheExpire | FALSE |
line 57 |
|
bool | $warnOnUndefined | TRUE |
line 39 |
Method Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 355 addpublic void add (string $name, mixed $value) Adds new template parameter.
|
|||||||||||||||
line 372 addTemplatepublic Template addTemplate (string $name, string|Template $file) Adds new template as parameter.
|
|||||||||||||||
line 464 getCacheStoragepublic static ICacheStorage getCacheStorage ()
|
|||||||||||||||
line 80 getFilepublic string getFile () Returns the path to the template file. Implementation of:
|
|||||||||||||||
line 385 getParamspublic array getParams () Returns array of all parameters.
|
|||||||||||||||
line 127 registerFilterpublic void registerFilter (callback $callback) Registers callback as template filter.
|
|||||||||||||||
line 279 registerHelperpublic void registerHelper (string $name, callback $callback) Registers callback as template helper.
|
|||||||||||||||
line 296 registerHelperLoaderpublic void registerHelperLoader (callback $callback) Registers callback as template helpers loader.
|
|||||||||||||||
line 147 renderpublic void render () Renders template to output. Implementation of:
|
|||||||||||||||
line 454 setCacheStoragepublic static void setCacheStorage ($storage) Set cache storage.
|
|||||||||||||||
line 69 setFilepublic void setFile (string $file) Sets the path to the template file. Implementation of:
|
|||||||||||||||
line 338 setTranslatorpublic void setTranslator ([$translator = Sets translate adapter.
|
|||||||||||||||
line 93 subTemplatepublic Template subTemplate (string $file, [$params = Creates subtemplate.
|
|||||||||||||||
line 259 toXmlpublic SimpleXMLElement toXml () Converts to SimpleXML. (experimental)
|
|||||||||||||||
line 314 __callpublic mixed __call (string $name, array $args) Call a template helper. Do not call directly.
|
|||||||||||||||
line 410 __getpublic mixed & __get (string $name) Returns a template parameter. Do not call directly.
|
|||||||||||||||
line 426 __issetpublic bool __isset (string $name) Determines whether parameter is defined. Do not call directly.
|
|||||||||||||||
line 398 __setpublic void __set (string $name, mixed $value) Sets a template parameter. Do not call directly.
|
|||||||||||||||
line 235 __toStringpublic string __toString (bool 0) Renders template to string.
|
|||||||||||||||
line 438 __unsetpublic void __unset (string $name) Removes a template parameter. Do not call directly.
|