Use FrontEndFileHandler as a singleton

This commit is contained in:
Kijin Sung 2025-03-27 10:46:09 +09:00
parent df1c365872
commit 5ccd4f68d9
2 changed files with 21 additions and 2 deletions

View file

@ -59,13 +59,32 @@ class FrontEndFileHandler extends Handler
protected $_log_enabled = false;
protected $_log_entries = [];
/**
* Singleton
*/
protected static $_instance = null;
/**
* Get singleton instance
*
* @return self
*/
public static function getInstance(): self
{
if (self::$_instance === null)
{
self::$_instance = new self();
}
return self::$_instance;
}
/**
* Check SSL
*
* @return bool If using ssl returns true, otherwise returns false.
* @deprecated
*/
public function isSsl()
public static function isSsl()
{
return \RX_SSL;
}