File
extends AbstractTemplate
in package
View file template class
Tags
Table of Contents
Properties
- $data : array<string|int, mixed>
- View data
- $output : string|null
- View output string
- $template : string|null
- View template
Methods
- __construct() : mixed
- Constructor
- getTemplate() : string
- Get view template
- render() : string
- Render the view and return the output
- setTemplate() : static
- Set view template
- renderTemplate() : void
- Render view template file
Properties
$data
View data
protected
array<string|int, mixed>
$data
= []
$output
View output string
protected
string|null
$output
= null
$template
View template
protected
string|null
$template
= null
Methods
__construct()
Constructor
public
__construct(string $template) : mixed
Instantiate the view file template object
Parameters
- $template : string
getTemplate()
Get view template
public
getTemplate() : string
Return values
stringrender()
Render the view and return the output
public
render([array<string|int, mixed>|null $data = null ]) : string
Parameters
- $data : array<string|int, mixed>|null = null
Tags
Return values
stringsetTemplate()
Set view template
public
setTemplate(string $template) : static
Parameters
- $template : string
Tags
Return values
staticrenderTemplate()
Render view template file
protected
renderTemplate() : void