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