Template_Loader
in
An object which can load PHP templates.
Tags
Table of Contents
- get_template() : string
- Return the HTML for the specified template.
- load_template() : mixed
- Echo (output) the HTML for the specified template.
Methods
get_template()
Return the HTML for the specified template.
public
get_template(string $template_name[, array<string|int, mixed> $args = [] ]) : string
Parameters
- $template_name : string
-
The template name (e.g. 'path/to/template.php')
- $args : array<string|int, mixed> = []
-
The template args.
Return values
string —The template HTML.
load_template()
Echo (output) the HTML for the specified template.
public
load_template(string $template_name[, array<string|int, mixed> $args = [] ]) : mixed
Parameters
- $template_name : string
-
The template name (e.g. 'path/to/template.php')
- $args : array<string|int, mixed> = []
-
The template args.