AbstractTemplate
in package
implements
TemplateInterface
AbstractYes
View template abstract class
Tags
Table of Contents
Interfaces
- TemplateInterface
- View template interface
Properties
- $data : array<string|int, mixed>
- View data
- $output : string|null
- View output string
- $template : string|null
- View template
Methods
- getTemplate() : string
- Get view template
- render() : string
- Render the view and return the output
- setTemplate() : AbstractTemplate
- 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
getTemplate()
Get view template
public
getTemplate() : string
Return values
stringrender()
Render the view and return the output
public
abstract render(array<string|int, mixed> $data) : string
Parameters
- $data : array<string|int, mixed>
Return values
stringsetTemplate()
Set view template
public
abstract setTemplate(string $template) : AbstractTemplate
Parameters
- $template : string
Return values
AbstractTemplaterenderTemplate()
Render view template file
protected
abstract renderTemplate() : void