PHP 8.2.31
Preview: WithNode.php Size: 1.45 KB
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/vendor-prefixed/twig/twig/src/Node/WithNode.php

<?php
namespace MailPoetVendor\Twig\Node;
if (!defined('ABSPATH')) exit;
use MailPoetVendor\Twig\Compiler;
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) : void
 {
 $compiler->addDebugInfo($this);
 $parentContextName = $compiler->getVarName();
 $compiler->write(\sprintf("\$%s = \$context;\n", $parentContextName));
 if ($this->hasNode('variables')) {
 $node = $this->getNode('variables');
 $varsName = $compiler->getVarName();
 $compiler->write(\sprintf('$%s = ', $varsName))->subcompile($node)->raw(";\n")->write(\sprintf("if (!\\MailPoetVendor\\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 = \\MailPoetVendor\\twig_to_array(\$%s);\n", $varsName, $varsName));
 if ($this->getAttribute('only')) {
 $compiler->write("\$context = [];\n");
 }
 $compiler->write(\sprintf("\$context = \$this->env->mergeGlobals(array_merge(\$context, \$%s));\n", $varsName));
 }
 $compiler->subcompile($this->getNode('body'))->write(\sprintf("\$context = \$%s;\n", $parentContextName));
 }
}

Directory Contents

Dirs: 1 × Files: 27

Name Size Perms Modified Actions
- drwxr-xr-x 2023-04-04 05:35:39
Edit Download
424 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
639 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
513 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
105 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
364 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
2.19 KB lrw-r--r-- 2023-04-04 05:35:39
Edit Download
612 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
970 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
501 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
1.01 KB lrw-r--r-- 2023-04-04 05:35:39
Edit Download
358 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
913 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
2.83 KB lrw-r--r-- 2023-04-04 05:35:39
Edit Download
936 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
1.14 KB lrw-r--r-- 2023-04-04 05:35:39
Edit Download
2.08 KB lrw-r--r-- 2023-04-04 05:35:39
Edit Download
0 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
2.15 KB lrw-r--r-- 2023-04-04 05:35:39
Edit Download
9.60 KB lrw-r--r-- 2023-04-04 05:35:39
Edit Download
3.29 KB lrw-r--r-- 2023-04-04 05:35:39
Edit Download
108 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
107 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
540 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
781 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
2.06 KB lrw-r--r-- 2023-04-04 05:35:39
Edit Download
442 B lrw-r--r-- 2023-04-04 05:35:39
Edit Download
1.45 KB lrw-r--r-- 2023-04-04 05:35:39
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).