CSSmartCSView
extends CSSmartView
in package
Class CSSmartCSView
Tags
Table of Contents
- __construct() : CSSmartView
- The constructor should be called only by the factory methods in the CSSmart API
- __get() : mixed
- The magic get method that is automatically called when external code uses a virtual public member var
- __set() : void
- The magic set method that is automatically called when external code sets a virtual public member var
- assign() : void
- Assigns variables to the view script via differing strategies.
- clear() : void
- This method clears the data vars of the view which could have been set through a magic set call
- createView() : CSView
- Implements the abstract createView method and returns a CSView object
- render() : string
- Renders the view against the data
- setVars() : void
- Set variable storage
Methods
__construct()
The constructor should be called only by the factory methods in the CSSmart API
public
__construct(mixed $templateFolder) : CSSmartView
Parameters
- $templateFolder : mixed
-
the template folder
Tags
Return values
CSSmartView —__get()
The magic get method that is automatically called when external code uses a virtual public member var
public
__get(string $key) : mixed
Parameters
- $key : string
Tags
Return values
mixed —the value as set in the magic set method
__set()
The magic set method that is automatically called when external code sets a virtual public member var
public
__set(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
Tags
Return values
void —assign()
Assigns variables to the view script via differing strategies.
public
final assign(mixed $mData[, mixed $sValue = null ]) : void
$view->assign('name', $value) assigns a variable called 'name' with the corresponding $value.
$view->assign($array) assigns the array keys as variable names (with the corresponding array values).
Parameters
- $mData : mixed
- $sValue : mixed = null
Tags
Return values
void —clear()
This method clears the data vars of the view which could have been set through a magic set call
public
clear() : void
Tags
Return values
void —createView()
Implements the abstract createView method and returns a CSView object
public
final createView() : CSView
Tags
Return values
CSView —The view
render()
Renders the view against the data
public
render(string $template) : string
It is possible to use {$variable} in the template as a short form of variable; ?>
Parameters
- $template : string
-
the template within the template folder
Tags
Return values
string —the rendered template
setVars()
Set variable storage
public
final setVars(array<string|int, mixed> $aData) : void
Parameters
- $aData : array<string|int, mixed>
-
Variables to be set
