403Webshell
Server IP : 104.26.4.103  /  Your IP : 216.73.217.51
Web Server : nginx/1.27.1
System : Linux in-5 5.15.0-191-generic #201-Ubuntu SMP Fri Aug 7 18:39:04 UTC 2026 x86_64
User : arabianexpress ( 1872)
PHP Version : 8.0.30
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /storage/v9321/leapdubai/public_html/wp-content/plugins/kirki/libraries/framework/View/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /storage/v9321/leapdubai/public_html/wp-content/plugins/kirki/libraries/framework/View/View.php
<?php

/**
 * Renderable view value object returned by the view() helper.
 *
 * @package    Framework
 * @subpackage View
 * @since      1.0.0
 */
namespace Kirki\Framework\View;

\defined('ABSPATH') || exit;
use function Kirki\Framework\app;
class View
{
    /**
     * The template name in dot notation.
     *
     * @var string
     *
     * @since 1.0.0
     */
    protected $template;
    /**
     * Data passed to the template.
     *
     * @var array
     *
     * @since 1.0.0
     */
    protected $data = [];
    /**
     * Whether to wrap the view in the theme layout.
     *
     * @var bool
     *
     * @since 1.0.0
     */
    protected $with_layout = \true;
    /**
     * Create a new View instance.
     *
     * @param string $template The template name.
     * @param array $data The template data.
     *
     * @return void
     *
     * @since 1.0.0
     */
    public function __construct(string $template, array $data = [])
    {
        $this->template = $template;
        $this->data = $data;
    }
    /**
     * Disable layout wrapping for this view.
     *
     * @return $this
     *
     * @since 1.0.0
     */
    public function partial()
    {
        $this->with_layout = \false;
        return $this;
    }
    /**
     * Enable or set layout wrapping for this view.
     *
     * @param bool $enabled Whether layout wrapping is enabled.
     *
     * @return $this
     *
     * @since 1.0.0
     */
    public function layout($enabled = \true)
    {
        $this->with_layout = (bool) $enabled;
        return $this;
    }
    /**
     * Merge additional data into the view.
     *
     * @param array $data The data to merge.
     *
     * @return $this
     *
     * @since 1.0.0
     */
    public function with(array $data)
    {
        $this->data = \array_merge($this->data, $data);
        return $this;
    }
    /**
     * Get the template name.
     *
     * @return string
     *
     * @since 1.0.0
     */
    public function get_template()
    {
        return $this->template;
    }
    /**
     * Get the view data.
     *
     * @return array
     *
     * @since 1.0.0
     */
    public function get_data()
    {
        return $this->data;
    }
    /**
     * Whether the view uses layout wrapping.
     *
     * @return bool
     *
     * @since 1.0.0
     */
    public function uses_layout()
    {
        return $this->with_layout;
    }
    /**
     * Render the view to a string.
     *
     * @return string
     *
     * @since 1.0.0
     */
    public function render()
    {
        return app(TemplateEngine::class)->render($this->template, $this->data, $this->with_layout);
    }
    /**
     * Render the view when cast to string.
     *
     * @return string
     *
     * @since 1.0.0
     */
    public function __toString()
    {
        return $this->render();
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit