Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Upload Files :
Command :
Current File : /usr/local/lsws/add-ons/webcachemgr/src/View//AjaxView.php
<?php
/** ******************************************
* LiteSpeed Web Server Cache Manager
*
* @author LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
* @copyright (c) 2018-2020
* ******************************************* */
namespace Lsc\Wp\View;
use \Lsc\Wp\LSCMException;
class AjaxView
{
/**
* @var object
*/
private $viewModel;
/**
* @var string
*/
private $sharedTplDir = __DIR__;
/**
*
* @param object $viewModel
*/
public function __construct( $viewModel )
{
$this->viewModel = $viewModel;
}
/**
*
* @param string $tplID
* @return string
* @throws LSCMException Thrown directly and indirectly.
*/
public function getAjaxContent( $tplID = '' )
{
ob_start();
try
{
$this->loadAjaxTpl($this->viewModel->getTpl($tplID));
}
catch ( LSCMException $e )
{
ob_clean();
throw $e;
}
return ob_get_clean();
}
/**
*
* @param string $tplPath
* @throws LSCMException
*/
private function loadAjaxTpl( $tplPath )
{
$tplFile = basename($tplPath);
$custTpl = "{$this->sharedTplDir}/Cust/{$tplFile}";
if ( file_exists($custTpl) ) {
include $custTpl;
}
elseif ( file_exists($tplPath) ) {
include $tplPath;
}
else {
throw new LSCMException("Could not load ajax template {$tplPath}.");
}
}
}
Name |
Size |
Last Modified |
Owner / Group |
Permissions |
Options |
.. | -- | April 30 2025 22:14:03 | root / root | 0775 | |
Model | -- | April 30 2025 22:14:03 | root / root | 0775 | |
Tpl | -- | April 30 2025 22:14:03 | root / root | 0775 | |
| | | | | |
AjaxView.php | 1.529 KB | April 30 2025 22:14:03 | root / root | 0664 | |