Seditio Source
Root |
./othercms/xenForo 2.2.8/src/XF/Template/Compiler/Syntax/Hash.php
<?php

namespace XF\Template\Compiler\Syntax;

use
XF\Template\Compiler;

class
Hash extends AbstractSyntax
{
   
/**
     * @var array
     */
   
public $parts = [];

    public function
__construct(array $parts, $line)
    {
       
$this->parts = $parts;
       
$this->line = $line;
    }

    public function
compile(Compiler $compiler, array $context, $inlineExpected)
    {
       
$context['escape'] = false;

       
$code = ['array('];
        foreach (
$this->parts AS $part)
        {
           
$code[] = $part[0]->compile($compiler, $context, true);
           
$code[] = ' => ';
           
$code[] = $part[1]->compile($compiler, $context, true);
           
$code[] = ', ';
        }
       
$code[] = ')';

        return
implode('', $code);
    }
}