View Interface Reference
Detailed Description
Inheritance diagram for View:
Public Member Functions | |
setValue ($name, $value) | |
getValue ($name) | |
getValues () | |
clearAllValues () | |
render ($tplFile, $cacheId=null, $display=true) | |
Static Public Member Functions | |
static | clearCache () |
static | isCached ($tplFile, $cacheId=null) |
static | getTemplate ($controller, $context, $action) |
Member Function Documentation
setValue | ( | $name, | |
$value | |||
) |
Assign a value to the view.
- Parameters
-
$name The variable name $value The value
Implemented in SmartyView, and NullView.
getValue | ( | $name | ) |
Get a value from the view.
- Parameters
-
$name The variable name
- Returns
- Mixed
Implemented in SmartyView, and NullView.
getValues | ( | ) |
clearAllValues | ( | ) |
Clear all values in the view.
Implemented in SmartyView, and NullView.
render | ( | $tplFile, | |
$cacheId = null , |
|||
$display = true |
|||
) |
Render the given template.
- Parameters
-
$tplFile The template file $cacheId The id of the view (
- See also
- Controller::getCacheId())
- Parameters
-
$display Boolean whether to output the result or return it (default: true)
Implemented in SmartyView, and NullView.
|
static |
Clear the cache.
- Returns
- Integer number of cache files deleted
Implemented in SmartyView, and NullView.
|
static |
Check if a view is cached.
- Parameters
-
$tplFile The template file $cacheId The id of the view (
- See also
- Controller::getCacheId())
Implemented in SmartyView, and NullView.
|
static |
Get the template filename for the view from the configfile for the given action key.
- Parameters
-
$controller The name of the controller $context The name of the context $action The name of the action
- Returns
- The filename of the template or false, if no view is defined
Implemented in SmartyView, and NullView.