$twig =
$this->
initEnv($script);
$services =
$this->
initServices($hook,
$script);
$twig->
addGlobal('services',
$services);
$this->traces->
trace($hook,
$script,
function DDebug
$debug) use ($twig,
$script,
$hook): void
{ $twig->
addGlobal('debug',
$debug);
if ($hook instanceof DeprecatedHook
) { ScriptTraces::
addDeprecationNotice($hook->
getDeprecationNotice());
} $template =
$twig->
load($script->
getName());
if (!
$hook instanceof FunctionHook
) { $template->
render(['hook' =>
$hook]);
return;
} $blockName =
$hook->
getFunctionName();