Registry /
other / schranz-templating-template-renderer
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
TemplateRendererInterface
✓ use Schranz\Templating\TemplateRenderer\TemplateRendererInterface;
Minimal implementation of the template renderer interface.
use Schranz\Templating\TemplateRenderer\TemplateRendererInterface;
$renderer = new class implements TemplateRendererInterface {
public function render(string $template, array $parameters = []): string {
return 'Hello, ' . ($parameters['name'] ?? 'World');
}
};
echo $renderer->render('hello', ['name' => 'PHP']);
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.