Class NTemplate


NTemplate stored in file.

NObject
   |
   --NBaseTemplate
      |
      --NTemplate

Implements interfaces:

Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Templates/Template.php (line 35)
Public Method Summary
NTemplate
__construct ([string $file = NULL])
Constructor.
static ICacheStorage
string
getFile ()
Returns the path to the template file.
void
render ()
Renders template to output.
static void
setCacheStorage ($storage)
NSet cache storage.
NTemplate
setFile (string $file)
Sets the path to the template file.
Methods Inherited From NBaseTemplate
add(), compile(), getFilters(), getHelpers(), getParams(), optimizePhp(), registerFilter(), registerHelper(), registerHelperLoader(), render(), setParams(), setTranslator(), __call(), __get(), __isset(), __set(), __toString(), __unset()
Methods Inherited From NObject
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary
static int $cacheExpire FALSE

line 38


Method Details

line 52

__construct

public NTemplate __construct ([string $file = NULL])

Constructor.

Input
string $file template file path
Output
NTemplate  

line 166

getCacheStorage

public static ICacheStorage getCacheStorage ()

Output
ICacheStorage  

line 81

getFile

public string getFile ()

Returns the path to the template file.

Implementation of:

Output
string template file path

line 96

render

public void render ()

Renders template to output.

Implementation of:

Output
void  

line 156

setCacheStorage

public static void setCacheStorage ($storage)

NSet cache storage.

Input
$storage
Output
void  

line 66

setFile

public NTemplate setFile (string $file)

Sets the path to the template file.

Implementation of:

Input
string $file template file path
Output
NTemplate provides a fluent interface