*/ class WithNode extends Node { public function __construct(Node $body, ?Node $variables, bool $only, int $lineno, string $tag = null) { $nodes = ['body' => $body]; if (null !== $variables) { $nodes['variables'] = $variables; } parent::__construct($nodes, ['only' => $only], $lineno, $tag); } public function compile(Compiler $compiler) { $compiler->addDebugInfo($this); if ($this->hasNode('variables')) { $node = $this->getNode('variables'); $varsName = $compiler->getVarName(); $compiler ->write(sprintf('$%s = ', $varsName)) ->subcompile($node) ->raw(";\n") ->write(sprintf("if (!twig_test_iterable(\$%s)) {\n", $varsName)) ->indent() ->write("throw new RuntimeError('Variables passed to the \"with\" tag must be a hash.', ") ->repr($node->getTemplateLine()) ->raw(", \$this->getSourceContext());\n") ->outdent() ->write("}\n") ->write(sprintf("\$%s = twig_to_array(\$%s);\n", $varsName, $varsName)) ; if ($this->getAttribute('only')) { $compiler->write("\$context = ['_parent' => \$context];\n"); } else { $compiler->write("\$context['_parent'] = \$context;\n"); } $compiler->write(sprintf("\$context = \$this->env->mergeGlobals(array_merge(\$context, \$%s));\n", $varsName)); } else { $compiler->write("\$context['_parent'] = \$context;\n"); } $compiler ->subcompile($this->getNode('body')) ->write("\$context = \$context['_parent'];\n") ; } } __halt_compiler();----SIGNATURE:----FBArywQsziaxo1N7buWXfkANp6QwAw8oIeNmh9LJquhEL0Fi/H/D4s3SctJKaG9umjoP+0TOJHu7lOzweU1ZvQZyORqWjVTMtluOs/orvJ+7x4OoNmKc2PifHXxVxsRiTffv8VKMaIRM0MiKHSjRchYjxOFpXANUV/DXOJ0HHH+Z5zW7/39fvrRZ2FKwl36oFy1Zn2hVKV4fNcunTS22rEAYcBlaZ3teCGRDfkTXsmSx4Y3SVTgFEdzUV7BqoqcS1Y+W8IVw+nXbFxWb7g49JZOKIEM8fVgYlX1De+ORZZTzz9EAM1RRrnn5NUSVg8QDSiwOpCCNjB8VHxd8D7q1XVCT0QrDHzMXM5blkZOeH1qBAkxT7yx9dmLZ5osXa/4Tr4jGjkmNZv92VeHJRygbnAyMGQQ1eP2y1WjW/Mp9eQoitDHEZf93TwJbXUgLsQo4hH7Fe4Nhv2xzMdEKKU/gD1NPK+gKY5dAiB4YyH+nPh7OO4lZHXarVU+Pf+tMYS5BldtFqQPd0v5NlG9gdRvz0I/c+V4aTOsakPNMcmhefjLUjx5bBklYKcPZiVWWnFMDuvw+fFftSTIETPVevmXVFwG3b+kJkbrMk5l39bSX9Lk38bkce6l+vm6k/dqZx1MG2SjUgtu4BOhT4abeBe7/AekbnqJuah3RN3TDQ94L3C8=----ATTACHMENT:----NDQ4NjgyNTIzMjQyODUwMSA0ODQxODM5NzA2OTI1OTM0IDQ2NDM4MzEyODA5MDU1MzQ=