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

<?php
namespace MailPoetVendor\Twig\Node;
if (!defined('ABSPATH')) exit;
use MailPoetVendor\Twig\Compiler;
use MailPoetVendor\Twig\Node\Expression\ConstantExpression;
class SetNode extends Node implements NodeCaptureInterface
{
 public function __construct(bool $capture, Node $names, Node $values, int $lineno, string $tag = null)
 {
 parent::__construct(['names' => $names, 'values' => $values], ['capture' => $capture, 'safe' => \false], $lineno, $tag);
 if ($this->getAttribute('capture')) {
 $this->setAttribute('safe', \true);
 $values = $this->getNode('values');
 if ($values instanceof TextNode) {
 $this->setNode('values', new ConstantExpression($values->getAttribute('data'), $values->getTemplateLine()));
 $this->setAttribute('capture', \false);
 }
 }
 }
 public function compile(Compiler $compiler) : void
 {
 $compiler->addDebugInfo($this);
 if (\count($this->getNode('names')) > 1) {
 $compiler->write('list(');
 foreach ($this->getNode('names') as $idx => $node) {
 if ($idx) {
 $compiler->raw(', ');
 }
 $compiler->subcompile($node);
 }
 $compiler->raw(')');
 } else {
 if ($this->getAttribute('capture')) {
 if ($compiler->getEnvironment()->isDebug()) {
 $compiler->write("ob_start();\n");
 } else {
 $compiler->write("ob_start(function () { return ''; });\n");
 }
 $compiler->subcompile($this->getNode('values'));
 }
 $compiler->subcompile($this->getNode('names'), \false);
 if ($this->getAttribute('capture')) {
 $compiler->raw(" = ('' === \$tmp = ob_get_clean()) ? '' : new Markup(\$tmp, \$this->env->getCharset())");
 }
 }
 if (!$this->getAttribute('capture')) {
 $compiler->raw(' = ');
 if (\count($this->getNode('names')) > 1) {
 $compiler->write('[');
 foreach ($this->getNode('values') as $idx => $value) {
 if ($idx) {
 $compiler->raw(', ');
 }
 $compiler->subcompile($value);
 }
 $compiler->raw(']');
 } else {
 if ($this->getAttribute('safe')) {
 $compiler->raw("('' === \$tmp = ")->subcompile($this->getNode('values'))->raw(") ? '' : new Markup(\$tmp, \$this->env->getCharset())");
 } else {
 $compiler->subcompile($this->getNode('values'));
 }
 }
 }
 $compiler->raw(";\n");
 }
}

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).