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

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

- Page: https://pluginprobe.com/plugins/ultimate-store-kit/2.0.5/code/base/singleton.php
- Raw: https://pluginprobe.com/plugins/ultimate-store-kit/2.0.5/raw/base/singleton.php
- Modified: 2024-08-27T11:20:32+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/2.0.5/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;
	}
}

```
