View
in package
Table of Contents
- $template : string
- Template file.
- $vars : array<string|int, mixed>
- View variables.
- __construct() : mixed
- Constructor.
- __toString() : mixed
- fetch() : string
- Gets the output of a template.
- render() : mixed
- Outputs a template.
Properties
$template
Template file.
public
string
$template
$vars
View variables.
public
array<string|int, mixed>
$vars
= []
Methods
__construct()
Constructor.
public
__construct(string $path[, string $vars = [] ]) : mixed
Parameters
- $path : string
-
Path to templates directory
- $vars : string = []
Return values
mixed —__toString()
public
__toString() : mixed
Return values
mixed —fetch()
Gets the output of a template.
public
fetch([array<string|int, mixed> $data = [] ]) : string
Parameters
- $data : array<string|int, mixed> = []
-
Template data
Return values
string —Output of template
render()
Outputs a template.
public
render([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
-
Template data