FM

/home/u523506497/domains/mymelon.in/public_html/wp-content/plugins/litespeed-cache/src UP

<?php
// phpcs:ignoreFile

/**
 * The abstract instance
 *
 * @since       3.0
 */

namespace LiteSpeed;

defined('WPINC') || exit();

abstract class Root {

	const CONF_FILE = '.litespeed_conf.dat';
	// Instance set
	private static $_instances;

	private static $_options         = array();
	private static $_const_options   = array();
	private static $_primary_options = array();
	private static $_network_options = array();

	/**
	 * Check if need to separate ccss for mobile
	 *
	 * @since  4.7
	 * @access protected
	 */
	protected function _separate_mobile() {
		return (wp_is_mobile() || apply_filters('litespeed_is_mobile', false)) && $this->conf(Base::O_CACHE_MOBILE);
	}

	/**
	 * Log an error message
	 *
	 * @since 7.0
	 */
	public static function debugErr( $msg, $backtrace_limit = false ) {
		$msg = '❌ ' . $msg;
		self::debug($msg, $backtrace_limit);
	}

	/**
	 * Log a debug message.
	 *
	 * @since  4.4
	 * @access public
	 */
	public static function debug( $msg, $backtrace_limit = false ) {
		if (!defined('LSCWP_LOG')) {
			return;
		}

		if (defined('static::LOG_TAG')) {
			$msg = static::LOG_TAG . '  ' . $msg;
		}

		Debug2::debug($msg, $backtrace_limit);
	}

	/**
	 * Log an advanced debug message.
	 *
	 * @since  4.4
	 * @access public
	 */
	public static function debug2( $msg, $backtrace_limit = false ) {
		if (!defined('LSCWP_LOG_MORE')) {
			return;
		}

		if (defined('static::LOG_TAG')) {
			$msg = static::LOG_TAG . '  ' . $msg;
		}
		Debug2::debug2($msg, $backtrace_limit);
	}

	/**
	 * Check if there is cache folder for that type
	 *
	 * @since  3.0
	 */
	public function has_cache_folder( $type ) {
		$subsite_id = is_multisite() && !is_network_admin() ? get_current_blog_id() : '';

		if (file_exists(LITESPEED_STATIC_DIR . '/' . $type . '/' . $subsite_id)) {
			return true;
		}
		return false;
	}

	/**
	 * Maybe make the cache folder if not existed
	 *
	 * @since 4.4.2
	 */
	protected function _maybe_mk_cache_folder( $type ) {
		if (!$this->has_cache_folder($type)) {
			$subsite_id = is_multisite() && !is_network_admin() ? get_current_blog_id() : '';
			$path       = LITESPEED_STATIC_DIR . '/' . $type . '/' . $subsite_id;
			mkdir($path, 0755, true);
		}
	}

	/**
	 * Delete file-based cache folder for that type
	 *
	 * @since  3.0
	 */
	public function rm_cache_folder( $type ) {
		if (!$this->has_cache_folder($type)) {
			return;
		}

		$subsite_id = is_multisite() && !is_network_admin() ? get_current_blog_id() : '';

		File::rrmdir(LITESPEED_STATIC_DIR . '/' . $type . '/' . $subsite_id);

		// Clear All summary data
		self::save_summary(false, false, true);

		if ($type == 'ccss' || $type == 'ucss') {
			Debug2::debug('[CSS] Cleared ' . $type . ' queue');
		} elseif ($type == 'avatar') {
			Debug2::debug('[Avatar] Cleared ' . $type . ' queue');
		} elseif ($type == 'css' || $type == 'js') {
			return;
		} else {
			Debug2::debug('[' . strtoupper($type) . '] Cleared ' . $type . ' queue');
		}
	}

	/**
	 * Build the static filepath
	 *
	 * @since  4.0
	 */
	protected function _build_filepath_prefix( $type ) {
		$filepath_prefix = '/' . $type . '/';
		if (is_multisite()) {
			$filepath_prefix .= get_current_blog_id() . '/';
		}

		return $filepath_prefix;
	}

	/**
	 * Load current queues from data file
	 *
	 * @since  4.1
	 * @since  4.3 Elevated to root.cls
	 */
	public function load_queue( $type ) {
		$filepath_prefix = $this->_build_filepath_prefix($type);
		$static_path     = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';

		$queue = array();
		if (file_exists($static_path)) {
			$queue = \json_decode(file_get_contents($static_path), true) ?: array();
		}

		return $queue;
	}

	/**
	 * Save current queues to data file
	 *
	 * @since  4.1
	 * @since  4.3 Elevated to root.cls
	 */
	public function save_queue( $type, $list ) {
		$filepath_prefix = $this->_build_filepath_prefix($type);
		$static_path     = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';

		$data = \json_encode($list);

		File::save($static_path, $data, true);
	}

	/**
	 * Clear all waiting queues
	 *
	 * @since  3.4
	 * @since  4.3 Elevated to root.cls
	 */
	public function clear_q( $type, $silent = false ) {
		$filepath_prefix = $this->_build_filepath_prefix($type);
		$static_path     = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';

		if (file_exists($static_path)) {
			$silent = false;
			unlink($static_path);
		}

		if (!$silent) {
			$msg = __('All QUIC.cloud service queues have been cleared.', 'litespeed-cache');
			Admin_Display::success($msg);
		}
	}

	/**
	 * Load an instance or create it if not existed
	 *
	 * @since  4.0
	 */
	public static function cls( $cls = false, $unset = false, $data = false ) {
		if (!$cls) {
			$cls = self::ori_cls();
		}
		$cls = __NAMESPACE__ . '\\' . $cls;

		$cls_tag = strtolower($cls);

		if (!isset(self::$_instances[$cls_tag])) {
			if ($unset) {
				return;
			}

			self::$_instances[$cls_tag] = new $cls($data);
		} elseif ($unset) {
			unset(self::$_instances[$cls_tag]);
			return;
		}

		return self::$_instances[$cls_tag];
	}

	/**
	 * Set one conf or confs
	 */
	public function set_conf( $id, $val = null ) {
		if (is_array($id)) {
			foreach ($id as $k => $v) {
				$this->set_conf($k, $v);
			}
			return;
		}
		self::$_options[$id] = $val;
	}

	/**
	 * Set one primary conf or confs
	 */
	public function set_primary_conf( $id, $val = null ) {
		if (is_array($id)) {
			foreach ($id as $k => $v) {
				$this->set_primary_conf($k, $v);
			}
			return;
		}
		self::$_primary_options[$id] = $val;
	}

	/**
	 * Set one network conf
	 */
	public function set_network_conf( $id, $val = null ) {
		if (is_array($id)) {
			foreach ($id as $k => $v) {
				$this->set_network_conf($k, $v);
			}
			return;
		}
		self::$_network_options[$id] = $val;
	}

	/**
	 * Set one const conf
	 */
	public function set_const_conf( $id, $val ) {
		self::$_const_options[$id] = $val;
	}

	/**
	 * Check if is overwritten by const
	 *
	 * @since  3.0
	 */
	public function const_overwritten( $id ) {
		if (!isset(self::$_const_options[$id]) || self::$_const_options[$id] == self::$_options[$id]) {
			return null;
		}
		return self::$_const_options[$id];
	}

	/**
	 * Check if is overwritten by primary site
	 *
	 * @since  3.2.2
	 */
	public function primary_overwritten( $id ) {
		if (!isset(self::$_primary_options[$id]) || self::$_primary_options[$id] == self::$_options[$id]) {
			return null;
		}

		// Network admin settings is impossible to be overwritten by primary
		if (is_network_admin()) {
			return null;
		}

		return self::$_primary_options[$id];
	}

	/**
	 * Check if is overwritten by filter.
	 *
	 * @since 7.7
	 */
	public function filter_overwritten( $id ) {
		$val_setting = $this->conf($id, true);
		// if setting not found
		if( null === $val_setting ){
			return null;
		}

		$filter_name = 'litespeed_conf_load_option_' . $id;
		$val_filter  = apply_filters($filter_name, $val_setting );

		if ($val_setting === $val_filter) {
			// If the value is the same, return null.
			return null;
		}

		return $val_filter;
	}

	/**
	 * Check if is overwritten by code filter
	 *
	 * @deprecated 7.7 Use general filter_overwritten()
	 * @since  7.4
	 */
	public function deprecated_filter_overwritten( $id ) {
		$cls_admin_display = Admin_Display::$settings_filters;
		// Check if filter name is set.
		if(!isset($cls_admin_display[$id]) || !isset($cls_admin_display[$id]['filter']) || is_array($cls_admin_display[$id]['filter']) ){
			return null;
		}

		$val_setting = $this->conf($id, true);
		// if setting not found
		if( null === $val_setting ){
			$val_setting = '';
		}

		$val_filter = apply_filters($cls_admin_display[$id]['filter'], $val_setting );

		if ($val_setting === $val_filter) {
			// If the value is the same, return null.
			return null;
		}

		return $val_filter;
	}

	/**
	 * Check if is overwritten by $SERVER variable
	 *
	 * @since  7.4
	 */
	public function server_overwritten( $id ) {
		$cls_admin_display = Admin_Display::$settings_filters;
		if(!isset($cls_admin_display[$id]['filter'])){
			return null;
		}

		if(!is_array($cls_admin_display[$id]['filter'])) {
			$cls_admin_display[$id]['filter'] = array( $cls_admin_display[$id]['filter'] );
		}

		foreach( $cls_admin_display[$id]['filter'] as $variable ){
			if(isset($_SERVER[$variable])) {
				return [ $variable , $_SERVER[$variable] ] ;
			}
		}

		return null;
	}

	/**
	 * Get the list of configured options for the blog.
	 *
	 * @since 1.0
	 */
	public function get_options( $ori = false ) {
		if (!$ori) {
			return array_merge(self::$_options, self::$_primary_options, self::$_network_options, self::$_const_options);
		}

		return self::$_options;
	}

	/**
	 * If has a conf or not
	 */
	public function has_conf( $id ) {
		return array_key_exists($id, self::$_options);
	}

	/**
	 * If has a primary conf or not
	 */
	public function has_primary_conf( $id ) {
		return array_key_exists($id, self::$_primary_options);
	}

	/**
	 * If has a network conf or not
	 */
	public function has_network_conf( $id ) {
		return array_key_exists($id, self::$_network_options);
	}

	/**
	 * Get conf
	 */
	public function conf( $id, $ori = false ) {
		if (isset(self::$_options[$id])) {
			if (!$ori) {
				$val = $this->const_overwritten($id);
				if ($val !== null) {
					defined('LSCWP_LOG') && Debug2::debug('[Conf] 🏛️ const option ' . $id . '=' . var_export($val, true));
					return $val;
				}

				$val = $this->primary_overwritten($id); // Network Use primary site settings
				if ($val !== null) {
					return $val;
				}

				$val = $this->filter_overwritten($id);
				if ($val !== null) {
					return $val;
				}
			}

			// Network original value will be in _network_options
			if (!is_network_admin() || !$this->has_network_conf($id)) {
				return self::$_options[$id];
			}
		}

		if ($this->has_network_conf($id)) {
			if (!$ori) {
				$val = $this->const_overwritten($id);
				if ($val !== null) {
					defined('LSCWP_LOG') && Debug2::debug('[Conf] 🏛️ const option ' . $id . '=' . var_export($val, true));
					return $val;
				}
			}

			return $this->network_conf($id);
		}

		defined('LSCWP_LOG') && Debug2::debug('[Conf] Invalid option ID ' . $id);

		return null;
	}

	/**
	 * Get primary conf
	 */
	public function primary_conf( $id ) {
		return self::$_primary_options[$id];
	}

	/**
	 * Get network conf
	 */
	public function network_conf( $id ) {
		if (!$this->has_network_conf($id)) {
			return null;
		}

		return self::$_network_options[$id];
	}

	/**
	 * Get called class short name
	 */
	public static function ori_cls() {
		$cls       = new \ReflectionClass(get_called_class());
		$shortname = $cls->getShortName();
		$namespace = str_replace(__NAMESPACE__ . '\\', '', $cls->getNamespaceName() . '\\');
		if ($namespace) {
			// the left namespace after dropped LiteSpeed
			$shortname = $namespace . $shortname;
		}

		return $shortname;
	}

	/**
	 * Generate conf name for wp_options record
	 *
	 * @since 3.0
	 */
	public static function name( $id ) {
		$name = strtolower(self::ori_cls());
		return 'litespeed.' . $name . '.' . $id;
	}

	/**
	 * Dropin with prefix for WP's get_option
	 *
	 * @since 3.0
	 */
	public static function get_option( $id, $default_v = false ) {
		$v = get_option(self::name($id), $default_v);

		// Maybe decode array
		if (is_array($default_v)) {
			$v = self::_maybe_decode($v);
		}

		return $v;
	}

	/**
	 * Dropin with prefix for WP's get_site_option
	 *
	 * @since 3.0
	 */
	public static function get_site_option( $id, $default_v = false ) {
		$v = get_site_option(self::name($id), $default_v);

		// Maybe decode array
		if (is_array($default_v)) {
			$v = self::_maybe_decode($v);
		}

		return $v;
	}

	/**
	 * Dropin with prefix for WP's add_option
	 *
	 * @since 3.0
	 */
	public static function add_option( $id, $v ) {
		add_option(self::name($id), self::_maybe_encode($v));
	}

	/**
	 * Dropin with prefix for WP's add_site_option
	 *
	 * @since 3.0
	 */
	public static function add_site_option( $id, $v ) {
		add_site_option(self::name($id), self::_maybe_encode($v));
	}

	/**
	 * Dropin with prefix for WP's update_option
	 *
	 * @since 3.0
	 */
	public static function update_option( $id, $v ) {
		update_option(self::name($id), self::_maybe_encode($v));
	}

	/**
	 * Dropin with prefix for WP's update_site_option
	 *
	 * @since 3.0
	 */
	public static function update_site_option( $id, $v ) {
		update_site_option(self::name($id), self::_maybe_encode($v));
	}

	/**
	 * Decode an array
	 *
	 * @since  4.0
	 */
	protected static function _maybe_decode( $v ) {
		if (!is_array($v)) {
			$v2 = \json_decode($v, true);
			if ($v2 !== null) {
				$v = $v2;
			}
		}
		return $v;
	}

	/**
	 * Encode an array
	 *
	 * @since  4.0
	 */
	private static function _maybe_encode( $v ) {
		if (is_array($v)) {
			$v = \json_encode($v) ?: $v; // Non utf-8 encoded value will get failed, then used ori value
		}
		return $v;
	}

	/**
	 * Dropin with prefix for WP's delete_option
	 *
	 * @since 3.0
	 */
	public static function delete_option( $id ) {
		delete_option(self::name($id));
	}

	/**
	 * Dropin with prefix for WP's delete_site_option
	 *
	 * @since 3.0
	 */
	public static function delete_site_option( $id ) {
		delete_site_option(self::name($id));
	}

	/**
	 * Read summary
	 *
	 * @since  3.0
	 * @access public
	 */
	public static function get_summary( $field = false ) {
		$summary = self::get_option('_summary', array());

		if (!is_array($summary)) {
			$summary = array();
		}

		if (!$field) {
			return $summary;
		}

		if (array_key_exists($field, $summary)) {
			return $summary[$field];
		}

		return null;
	}

	/**
	 * Save summary
	 *
	 * @since  3.0
	 * @access public
	 */
	public static function save_summary( $data = false, $reload = false, $overwrite = false ) {
		if ($reload || empty(static::cls()->_summary)) {
			self::reload_summary();
		}

		$existing_summary = static::cls()->_summary;
		if ($overwrite || !is_array($existing_summary)) {
			$existing_summary = array();
		}
		$new_summary = array_merge($existing_summary, $data ?: array());
		// self::debug2('Save after Reloaded summary', $new_summary);
		static::cls()->_summary = $new_summary;

		self::update_option('_summary', $new_summary);
	}

	/**
	 * Reload summary
	 *
	 * @since 5.0
	 */
	public static function reload_summary() {
		static::cls()->_summary = self::get_summary();
		// self::debug2( 'Reloaded summary', static::cls()->_summary );
	}

	/**
	 * Get the current instance object. To be inherited.
	 *
	 * @since 3.0
	 */
	public static function get_instance() {
		return static::cls();
	}
}
activation.cls.php17723V
admin-display.cls.php49632V
admin-settings.cls.php11383V
admin.cls.php6276V
api.cls.php10612V
avatar.cls.php8860V
base.cls.php38560V
cdn-
cdn.cls.php16300V
cloud-auth-callback.trait.php10683V
cloud-auth-ip.trait.php4433V
cloud-auth.trait.php9608V
cloud-misc.trait.php10572V
cloud-node.trait.php6090V
cloud-request.trait.php20157V
cloud.cls.php7500V
conf.cls.php20000V
control.cls.php24933V
core.cls.php21474V
crawler-map.cls.php19874V
crawler.cls.php45795V
css.cls.php18200V
data.cls.php22738V
data.upgrade.func.php5856V
data_structure-
db-optm.cls.php15717V
debug2.cls.php18842V
doc.cls.php5577V
error.cls.php7530V
esi.cls.php27834V
file.cls.php10823V
guest.cls.php2821V
gui.cls.php37451V
health.cls.php2899V
htaccess.cls.php30526V
img-optm-manage.trait.php31586V
img-optm-pull.trait.php22632V
img-optm-send.trait.php22422V
img-optm.cls.php5383V
import.cls.php4395V
import.preset.cls.php5633V
lang.cls.php17430V
localization.cls.php4123V
media.cls.php45142V
metabox.cls.php5419V
object-cache-wp.cls.php19268V
object-cache.cls.php21450V
object.lib.php14504V
optimize.cls.php39568V
optimizer.cls.php10754V
placeholder.cls.php18358V
purge.cls.php35235V
report.cls.php6266V
rest.cls.php9301V
root.cls.php14631V
router.cls.php21256V
str.cls.php3156V
tag.cls.php9481V
task.cls.php7219V
tool.cls.php4268V
ucss.cls.php16739V
utility.cls.php26638V
vary.cls.php21842V
vpi.cls.php9600V
MyMelon - Digital Marketing and Creative Agency in Delhi, India
Skip to content Skip to footer

MyMelon Home Page

Bored Of Old School Strategies?

Conventional strategies do no justice to complex modern problems. Bringing in kickass blueprints to escalate your exclusive ideas to the growth trajectory.

MyMelon Home Page (1)

Falling In Love With Your Problems

Your problems are our play! You get to decide which ‘solutions’ feel like an astounding fuck yes!

Discover pitch-perfect marketing strategies to deliver complex ideas into simplified solutions. 

Diversity in our problem solving approach makes us who we are!

You Do You

For us every client and their offerings are unique. We offer tailored and hot-off-the-press strategies to produce a unique brand identity. Listening, evolving, and promoting your articles of faith is what makes our work kickass and compelling too!

#
Award
Type
Project
01
Best Project
Art Business
Business Style
2017
02
Best Design
Creative Work
Best Designers
2018
03
Best Concept
New Strategy
Branding Concept
2019
04
Best Picture
Visualization
Small Figures
2020

Our Inspirations

Vivekanand

Arise, awake, and stop not until the goal is achieved

Dr APJ Abdul Kalam

Creativity is seeing the same thing but thinking differently

Christopher Columbus

By prevailing over all obstacles one may unfailingly arrive at his chosen goal.

JRD Tata

Uncommon thinkers reuse what common thinkers refuse.

Lead The Way With Your New Digital Partners

Waiting to get viral? Don’t worry we’ve got your back!

Leading your way through business acumen and business strategies tailored to your needs.

Handholding you since your first lightbulb moment to making a mark in the industry through unique formulas.  Bringing unexpected things to the table is in our DNA.

Producing Tailored Solutions

One solution for multiple solutions is hard to swallow. Creating tailored solutions for your unique problems

Setting Benchmarks

Doesn’t carving a path for others give the best kick ever?

Making A Difference

You can’t wait for a case study. You will be too late!

Blogs

Contact Us

We work hard and then succeed on purpose.

We are constantly looking for a needle in a haystack and connecting to get the deal to happen!

If you've loved our idea and want to take the road less traveled, reach out to us on …….

Before you take the sure-shots of success, let's take some shots of vodka!

    Polscy gracze coraz częściej wybierają kasyno bez weryfikacji przy wypłacie bez ukrytych opłat, aby cieszyć się szybkim dostępem do gier i przejrzystymi warunkami wypłaty wygranych. Tego typu platformy stawiają na uproszczoną rejestrację, nowoczesne metody płatności oraz jasne zasady dotyczące transakcji. Przed rozpoczęciem gry warto zapoznać się z opiniami innych użytkowników, aby ocenić jakość obsługi i niezawodność serwisu.

    Jeśli chcesz znaleźć rzetelne opinie oraz porównać najlepsze platformy, casino Revolut Pay może pomóc Ci podjąć świadomą decyzję. Znajdziesz tam recenzje użytkowników, szczegóły bonusów oraz informacje o wpłatach i wypłatach w kasynach akceptujących Revolut.

    People searching for gerçek canlı casino usually mean live-dealer roulette, blackjack, baccarat, or game-show tables streamed from a studio with a real dealer, rather than an RNG-only game. To assess authenticity, verify the operator’s licence directly with the regulator, check the named game provider and studio, look for clear rules and table limits, inspect withdrawal terms, and confirm that the service is legal in your jurisdiction; a foreign licence does not automatically make an operator legal in Türkiye.

    [canlı casino lisans rehberi](https://guvenilircanlicasinos.com/)[gerçek krupiyeli oyunlar](https://www.livecasinos.com/tr/) [guvenilircanlicasinos](https://guvenilircanlicasinos.com/)

    Many Dutch players now look for beste online casino iDEAL to benefit from secure iDEAL deposits, low minimum stakes, and quick withdrawals. These casinos integrate trusted Dutch payment infrastructure with streamlined cashout systems, ideal for users who value speed, simplicity, and transparent transactions. By consulting authentic player reviews, gamblers can identify sites that consistently deliver rapid payouts and a seamless gaming experience.

    Gli online casinos with bancoposta sono principalmente operatori che accettano la carta Visa o Mastercard collegata al conto BancoPosta per depositi e, in alcuni casi, prelievi. Tra i nomi più citati in Italia figurano 888casino, SNAI, LeoVegas, Planetwin365, Gioco Digitale, Sisal e StarCasinò, con depositi minimi spesso tra 10€ e 20€ e limiti massimi che possono arrivare a diverse migliaia di euro. Per utilizzare la carta, di solito basta selezionare Visa o Mastercard alla cassa, inserire i dati della carta BancoPosta e completare la verifica 3D Secure; i prelievi possono tornare sulla stessa carta o sul conto tramite bonifico, con tempi tipici da 24 ore a 3–5 giorni lavorativi.

    Gracze poszukujący sprawdzonych platform często wybierają kasyno niemcy, które oferuje przejrzyste zasady wypłat i bezpieczne metody płatności. Przed rejestracją warto porównać limity transakcji, czas realizacji przelewów oraz dostępne opcje wpłat, aby uniknąć niepotrzebnych opóźnień. Opinie innych użytkowników mogą pomóc ocenić rzetelność obsługi, jakość gier i ogólny komfort korzystania z platformy.

    Oferty określane jako zagraniczne kasyna bonus bez depozytu mogą obejmować darmowe spiny lub niewielkie środki promocyjne przyznawane po rejestracji i weryfikacji konta. Przed skorzystaniem z promocji należy dokładnie sprawdzić wymagania obrotu, maksymalną wypłatę, czas ważności bonusu oraz ograniczenia dla użytkowników z Polski. Zagraniczna licencja nie legalizuje automatycznie działalności hazardowej w Polsce, dlatego warto zweryfikować operatora w oficjalnych źródłach i grać odpowiedzialnie .