PluginProbe
WowOptin: Next-Gen Popup Maker – Create Stunning Popups and Optins for Lead Generation / trunk
WowOptin: Next-Gen Popup Maker – Create Stunning Popups and Optins for Lead Generation vtrunk
1.4.48 1.4.47 1.4.46 1.4.45 1.4.44 1.4.43 1.4.42 1.4.41 1.4.40 1.4.39 1.4.38 1.4.37 1.4.36 1.1.2 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 64 releases
optin / includes / traits / trait-singleton.php

trait-singleton.php in WowOptin: Next-Gen Popup Maker – Create Stunning Popups and Optins for Lead Generation trunk, at includes/traits/trait-singleton.php

27 lines 426 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace OPTN\Includes\Traits;
4
5 trait Singleton {
6 private static $instance = null;
7
8 /**
9 * Constructor
10 *
11 * @return void
12 */
13 protected function __construct() {}
14
15 final public static function get_instance() {
16 if ( null === static::$instance ) {
17 static::$instance = new static();
18 }
19 return static::$instance;
20 }
21
22 /**
23 * Prevent cloning.
24 */
25 private function __clone() {}
26 }
27