Detailed Description

View is used by Controller to handle the view presentation in MVC pattern.

View is a subclass of Smarty that is customized for use with the wCMF.

Note
This class requires Smarty
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 36 of file SmartyView.php.

+ Inheritance diagram for SmartyView:

Public Member Functions

 __construct ()
 
 setCompileCheck ($compileCheck)
 
 setCaching ($caching)
 
 setCacheLifetime ($cacheLifeTime)
 
 setCacheDir ($cacheDir)
 
 setPluginsDir ($pluginsDir)
 
 setOutputFilter ($outputFilter)
 
 setValue ($name, $value)
 
 getValue ($name)
 
 getValues ()
 
 clearAllValues ()
 
 render ($tplFile, $cacheId=null, $cacheLifetime=null, $display=true)
 

Static Public Member Functions

static clearCache ($tplFile=null, $cacheId=null)
 
static isCached ($tplFile, $cacheId=null)
 
static getCacheDate ($tplFile, $cacheId=null)
 
static getTemplate ($controller, $context, $action)
 

Protected Attributes

 $view = null
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Constructor.

Definition at line 47 of file SmartyView.php.

Member Function Documentation

◆ setCompileCheck()

setCompileCheck (   $compileCheck)

Set whether the view should check for template modifications or not.

Parameters
$compileCheckBoolean

Definition at line 76 of file SmartyView.php.

◆ setCaching()

setCaching (   $caching)

Set whether views should be cached.

Parameters
$cachingBoolean

Definition at line 84 of file SmartyView.php.

◆ setCacheLifetime()

setCacheLifetime (   $cacheLifeTime)

Set the time a view should be cached.

Parameters
$cacheLifeTimeInteger (seconds)

Definition at line 92 of file SmartyView.php.

◆ setCacheDir()

setCacheDir (   $cacheDir)

Set the caching directory If not existing, the directory will be created relative to WCMF_BASE.

Parameters
$cacheDirString

Definition at line 101 of file SmartyView.php.

◆ setPluginsDir()

setPluginsDir (   $pluginsDir)

Set a additional plugins directory.

Parameters
$pluginsDirDirectory relative to WCMF_BASE

Definition at line 114 of file SmartyView.php.

◆ setOutputFilter()

setOutputFilter (   $outputFilter)

Set additional output filters.

Parameters
$outputFilter

Definition at line 122 of file SmartyView.php.

◆ setValue()

setValue (   $name,
  $value 
)
See also
View::setValue()

Implements View.

Definition at line 131 of file SmartyView.php.

◆ getValue()

getValue (   $name)
See also
View::getValue()

Implements View.

Definition at line 138 of file SmartyView.php.

◆ getValues()

getValues ( )
See also
View::getValues()

Implements View.

Definition at line 145 of file SmartyView.php.

◆ clearAllValues()

clearAllValues ( )
See also
View::clearAllValues()

Implements View.

Definition at line 152 of file SmartyView.php.

◆ render()

render (   $tplFile,
  $cacheId = null,
  $cacheLifetime = null,
  $display = true 
)
See also
View::display()

Implements View.

Definition at line 159 of file SmartyView.php.

◆ clearCache()

static clearCache (   $tplFile = null,
  $cacheId = null 
)
static
See also
View::clearCache()

Implements View.

Definition at line 179 of file SmartyView.php.

◆ isCached()

static isCached (   $tplFile,
  $cacheId = null 
)
static
See also
View::isCached() Returns also false, if caching is disabled to make sure that views get regenerated every time when expected.

Implements View.

Definition at line 199 of file SmartyView.php.

◆ getCacheDate()

static getCacheDate (   $tplFile,
  $cacheId = null 
)
static
See also
View::getCacheDate()

Implements View.

Definition at line 210 of file SmartyView.php.

◆ getTemplate()

static getTemplate (   $controller,
  $context,
  $action 
)
static
See also
View::getTemplate()

Implements View.

Definition at line 221 of file SmartyView.php.

Member Data Documentation

◆ $view

$view = null
protected

Definition at line 42 of file SmartyView.php.