EnhancedStringTemplate
extends StringTemplate
in package
Table of Contents
Properties
- $_callback : callable
- General callback function.
- $_callbacks : array<string|int, mixed>
- Array of callback function for specific templates.
Methods
- format() : string
- Format a template string with $data
Properties
$_callback
General callback function.
protected
callable
$_callback
= null
$_callbacks
Array of callback function for specific templates.
protected
array<string|int, mixed>
$_callbacks
= null
Methods
format()
Format a template string with $data
public
format(string $name, array<string|int, mixed> $data) : string
Parameters
- $name : string
-
The template name.
- $data : array<string|int, mixed>
-
The data to insert.