HEX
Server: Apache
System: Linux sg2plmcpnl492417.prod.sin2.secureserver.net 4.18.0-553.58.1.lve.el8.x86_64 #1 SMP Fri Jul 4 12:07:06 UTC 2025 x86_64
User: nyiet8349bzl (9207396)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/plugins/coblocks/includes/traits/trait-coblocks-singleton.php
<?php
/**
 * Trait for our Singleton pattern.
 *
 * @package CoBlocks
 */

/**
 * Trait for our Singleton pattern.
 *
 * @since 2.3.0
 */
trait CoBlocks_Singleton_Trait {
	/**
	 * The object instance.
	 *
	 * @var Object
	 */
	private static $instance = null;

	/**
	 * Return the plugin instance.
	 *
	 * @return Object
	 */
	public static function register() {
		if ( ! self::$instance ) {
			self::$instance = new self();
		}
		return self::$instance;
	}

	/**
	 * Reset the plugin instance.
	 */
	public static function reset() {
		self::$instance = null;
	}
}