BaseTemplate
API reference › HTML Helper › Base › BaseTemplate
1 subclass
Provides reusable token substitution for template strings.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
render() static | Renders a template string by substituting tokens with provided values. | BaseTemplate |
Method details
Section titled “Method details”render()
Section titled “render() ”public static function render(string $template, mixed[] $tokenValues): stringRenders a template string by substituting tokens with provided values.
Converts literal \n sequences to line breaks and removes empty lines after substitution.
Parameters
| Parameter | Type | Description |
|---|---|---|
$template | string | Template string containing tokens to be replaced. |
$tokenValues | mixed[] | Associative array of token replacements. |
Returns
string: Rendered template string with substituted values.