Template_Loader

An object which can load PHP templates.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

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.

Return values
mixed

Search results