View
in package
The view class allows to pass a filename and a set of data for the system to generate a string containing the generated html for the view.
Tags
Table of Contents
- $data : array<string, mixed>
- $file : string
- The file to be used for rendering. We currently only support pug files for this.
- __construct() : mixed
- render() : string
- Generate a string from the provided template file and data.
Properties
$data
private
array<string, mixed>
$data
$file
The file to be used for rendering. We currently only support pug files for this.
private
string
$file
Methods
__construct()
public
__construct(string $file, array<string|int, mixed> $data) : mixed
Parameters
- $file : string
- $data : array<string|int, mixed>
Return values
mixed —render()
Generate a string from the provided template file and data.
public
render() : string