# ultimate-store-kit/1.6.2/base/singleton.php

Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder, version 1.6.2. 22 lines.

- Page: https://pluginprobe.com/plugins/ultimate-store-kit/1.6.2/code/base/singleton.php
- Raw: https://pluginprobe.com/plugins/ultimate-store-kit/1.6.2/raw/base/singleton.php
- Modified: 2024-06-11T09:35:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ultimate-store-kit/1.6.2/code/base/singleton.php#L10-L20`.

```php
<?php

namespace UltimateStoreKit\Base;

if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly.
}


trait Singleton {

	private static $instance;

	public static function instance() {
		if(!self::$instance) {
			self::$instance = new self();
		}

		return self::$instance;
	}
}

```
