mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
14 lines
436 B
PHP
14 lines
436 B
PHP
<?php
|
|
// Phase 04 (Track J.2) — PHP Twig benign control fixture.
|
|
//
|
|
// Renders a fixed template that interpolates the user value as a
|
|
// variable; the body never reaches the template compiler.
|
|
use Twig\Environment;
|
|
use Twig\Loader\ArrayLoader;
|
|
|
|
function run(string $body): string {
|
|
$twig = new Environment(new ArrayLoader([
|
|
'page' => '{{ safe_body }}',
|
|
]));
|
|
return $twig->render('page', ['safe_body' => $body]);
|
|
}
|