ITemplateEngine
in
Template engine for loading and rendering stub files
Table of Contents
Methods
- exists() : bool
- Check if a template exists
- load() : string|null
- Load raw template content
- render() : string
- Render template with data replacements
Methods
exists()
Check if a template exists
public
exists(string $template) : bool
Parameters
- $template : string
-
Template name (e.g., 'controller.resource.stub')
Return values
boolload()
Load raw template content
public
load(string $template) : string|null
Parameters
- $template : string
-
Template name
Return values
string|null —Template content or null if not found
render()
Render template with data replacements
public
render(string $template, array<string|int, mixed> $data) : string
Parameters
- $template : string
-
Template name
- $data : array<string|int, mixed>
-
Key-value pairs for {{placeholder}} replacement
Tags
Return values
string —Rendered content