# sureforms/0.0.13/inc/traits/get-instance.php

SureForms – Contact Form Builder, AI Forms, Payment Form, Survey &amp; Quiz, version 0.0.13. 39 lines.

- Page: https://pluginprobe.com/plugins/sureforms/0.0.13/code/inc/traits/get-instance.php
- Raw: https://pluginprobe.com/plugins/sureforms/0.0.13/raw/inc/traits/get-instance.php
- Modified: 2024-09-18T15:56:20+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/sureforms/0.0.13/code/inc/traits/get-instance.php#L10-L20`.

```php
<?php
/**
 * Trait.
 *
 * @package sureforms
 */

namespace SRFM\Inc\Traits;

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

/**
 * Trait Get_Instance.
 */
trait Get_Instance {

	/**
	 * Instance object.
	 *
	 * @var self Class Instance.
	 */
	private static $instance = null;

	/**
	 * Initiator
	 *
	 * @since 0.0.1
	 * @return self initialized object of class.
	 */
	public static function get_instance() {
		if ( null === self::$instance ) {
			self::$instance = new self();
		}
		return self::$instance;
	}
}

```
