Methods |
public
|
__construct()
View constructor.
|
#
|
public
|
__set(string $name, mixed $value)
Setter
Parameters
$name |
The property name
|
$value |
The property value
|
|
#
|
public
|
__get(string $name): mixed
Getter
|
#
|
public
|
addData(string $key, mixed $value)
Add data into view
Parameters
$key |
The variable name to be accessible in view
|
$value |
The value of the variable
|
|
#
|
public
|
addHeadStyle(string $file)
Add CSS file to be included in head section
Add CSS file to be included in head section
Parameters
$file |
An absolute file path or file name only.
The file name only will be prepended the folder name css/ and it will be looked in every sub-sites "css" folder
|
|
#
|
public
|
addHeadScript(string $file)
Add JS file to be included in head section
Add JS file to be included in head section
Parameters
$file |
An absolute file path or file name only.
The file name only will be prepended the folder name js/ and it will be looked in every sub-sites "js" folder
|
|
#
|
public
|
load(string $name = ''): void
Display view
Parameters
$name |
Optional view name to append to the file name such as view_{$name}.php
|
|
#
|
public
|
block(string $name, array $data = [], bool $return = false): false|string|void
Display block view
Parameters
$name |
Block view name to the file name with or without extension php
|
$data |
The data injected to the view
|
$return |
To return html or not
|
|
#
|
public
|
headStyle()
Include CSS files in head section. Make sure calling this method in head
Include CSS files in head section. Make sure calling this method in head
|
#
|
public
|
headScript()
Include JS files in head section. Make sure calling this method in head
Include JS files in head section. Make sure calling this method in head
|
#
|