PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 1.1.4
ShopBuilder – WooCommerce Builder For Elementor v1.1.4
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Traits/SingletonTrait.php +61 -54 2.1.111.1.4 View file →
@@ -1,54 +1,61 @@
1 -<?php
2 -/**
3 - *
4 - */
5 -
6 -namespace RadiusTheme\SB\Traits;
7 -
8 -// Do not allow directly accessing this file.
9 -if ( ! defined( 'ABSPATH' ) ) {
10 - exit( 'This script cannot be accessed directly.' );
11 -}
12 -
13 -trait SingletonTrait {
14 - /**
15 - * The single instance of the class.
16 - *
17 - * @var object
18 - */
19 - protected static $instance = null;
20 -
21 -
22 - /**
23 - * Constructor
24 - *
25 - * @return void
26 - */
27 - // public function __construct() {}
28 -
29 - /**
30 - * @return self
31 - */
32 - final public static function instance() {
33 - if ( null === self::$instance ) {
34 - self::$instance = new self();
35 - }
36 -
37 - return self::$instance;
38 - }
39 -
40 -
41 - /**
42 - * Prevent cloning.
43 - */
44 - final public function __clone() {
45 - }
46 -
47 - /**
48 - * Prevent unserializing.
49 - */
50 - final public function __wakeup() {
51 - _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'shopbuilder' ), '1.0' );
52 - die();
53 - }
54 -}
1 +<?php
2 +/**
3 + *
4 + */
5 +
6 +namespace RadiusTheme\SB\Traits;
7 +
8 +// Do not allow directly accessing this file.
9 +if ( ! defined( 'ABSPATH' ) ) {
10 + exit( 'This script cannot be accessed directly.' );
11 +}
12 +
13 +trait SingletonTrait {
14 + /**
15 + * The single instance of the class.
16 + *
17 + * @var object
18 + */
19 + protected static $instance = null;
20 +
21 +
22 + /**
23 + * Constructor
24 + *
25 + * @return void
26 + */
27 + // public function __construct() {}
28 +
29 + /**
30 + * @return self
31 + */
32 + final public static function instance() {
33 + if ( null === self::$instance ) {
34 + self::$instance = new self();
35 + }
36 +
37 + return self::$instance;
38 + }
39 +
40 +
41 + /**
42 + * Prevent cloning.
43 + */
44 + final public function __clone() {
45 + }
46 +
47 + // Prevent serialization of the instance
48 + public function __sleep() {
49 + _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'shopbuilder' ), '1.0' );
50 + die();
51 + }
52 +
53 +
54 + /**
55 + * Prevent unserializing.
56 + */
57 + final public function __wakeup() {
58 + _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'shopbuilder' ), '1.0' );
59 + die();
60 + }
61 +}