????JFIF??x?x????'
| Server IP : 104.21.30.238  /  Your IP : 216.73.216.153 Web Server : LiteSpeed System : Linux premium151.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 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /./proc/thread-self/root/././usr/local/lsws/add-ons/webcachemgr/src/  | 
Upload File :  | 
<?php
/** *********************************************
 * LiteSpeed Web Server Cache Manager
 *
 * @author    Michael Alegre
 * @copyright 2019-2025 LiteSpeed Technologies, Inc.
 * @since     1.9
 * *******************************************
 */
namespace Lsc\Wp;
/**
 * @since 1.9
 */
class AjaxResponse
{
    /**
     * @since 1.9
     * @var   AjaxResponse
     */
    protected static $instance;
    /**
     * @since 1.9
     * @var   string
     */
    protected $ajaxContent;
    /**
     * @since 1.9
     * @var   string
     */
    protected $headerContent;
    /**
     *
     * @since 1.9
     */
    private function __construct()
    {
    }
    /**
     *
     * @since 1.9
     *
     * @return AjaxResponse
     */
    private static function me()
    {
        if ( self::$instance == null ) {
            self::$instance = new self();
        }
        return self::$instance;
    }
    /**
     *
     * @since 1.9
     *
     * @throws LSCMException
     */
    public static function outputAndExit()
    {
        $output = '';
        if ( self::$instance == null ) {
            throw new LSCMException('AjaxResponse object never created!');
        }
        $m = self::me();
        if ( !empty($m->headerContent) ) {
            $output .= "{$m->headerContent}\n\n";
        }
        $output .= $m->ajaxContent;
        ob_clean();
        echo $output;
        exit;
    }
    /**
     *
     * @since 1.9
     *
     * @param string $ajaxContent
     */
    public static function setAjaxContent( $ajaxContent )
    {
        self::me()->ajaxContent = $ajaxContent;
    }
    /**
     *
     * @since 1.9
     *
     * @param string $headerContent
     */
    public static function setHeaderContent( $headerContent )
    {
        self::me()->headerContent = $headerContent;
    }
}