HEX
Server: Apache
System: Linux webm014.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: circuix (152771)
PHP: 8.0.30
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/circuix/adrRc/wp-content/plugins/essential-blocks/includes/wp-notice/Utils/Base.php
<?php

namespace EB\WPNotice\Utils;

abstract class Base {
	/**
	 * Holds the plugin instance.
	 *
	 * @since 2.0.0
	 * @access protected
	 * @static
	 *
	 * @var Base
	 */
	private static $instances = [];

	/**
	 * Sets up a single instance of the plugin.
	 *
	 * @since 1.0.0
	 * @access public
	 * @static
	 *
	 * @return static An instance of the class.
	 */
	public static function get_instance( ...$args ) {
		$module = get_called_class();
		$module_id = $module;

		if( $module === 'EB\WPNotice\Notice' || $module === 'EB\WPNotice\Dismiss' ) {
			$module_id = $module . '::' . $args[0];
		}

		if ( ! isset( self::$instances[ $module_id ] ) ) {
			self::$instances[ $module_id ] = new $module( ...$args );
		}

		return self::$instances[ $module_id ];
	}

	protected function database( $args = null ){
		return new Storage( $args );
	}
}