__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Nextend\Framework\View;
use Nextend\Framework\Pattern\GetPathTrait;
use Nextend\Framework\Pattern\MVCHelperTrait;
use Nextend\Framework\Sanitize;
abstract class AbstractLayout {
use GetPathTrait;
use MVCHelperTrait;
/** @var AbstractView */
protected $view;
/**
* @var AbstractBlock[]|string[]|array[]
*/
protected $contentBlocks = array();
protected $state = array();
/**
* AbstractLayout constructor.
*
* @param AbstractView $view
*
*/
public function __construct($view) {
$this->view = $view;
$this->setMVCHelper($view);
$this->getApplicationType()
->setLayout($this);
$this->enqueueAssets();
}
protected function enqueueAssets() {
$this->getApplicationType()
->enqueueAssets();
}
/**
* @param string $html contains already escaped data
*/
public function addContent($html) {
$this->contentBlocks[] = $html;
}
/**
* @param AbstractBlock $block contains already escaped data
*/
public function addContentBlock($block) {
$this->contentBlocks[] = $block;
}
public function displayContent() {
foreach ($this->contentBlocks as $content) {
if (is_string($content)) {
// PHPCS - Content already escaped
echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} else if (is_array($content)) {
// PHPCS - Content already escaped
echo call_user_func_array($content[0], $content[1]); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} else {
$content->display();
}
}
}
public function setState($name, $value) {
$this->state[$name] = $value;
}
public abstract function render();
}| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AbstractBlock.php | File | 862 B | 0664 |
|
| AbstractLayout.php | File | 1.88 KB | 0664 |
|
| AbstractView.php | File | 1.08 KB | 0664 |
|
| AbstractViewAjax.php | File | 841 B | 0664 |
|
| Html.php | File | 10.39 KB | 0664 |
|