| Server IP : 162.215.171.210 / Your IP : 216.73.216.246 Web Server : Apache System : Linux 162-215-171-210.bluehost.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : swansondentalgro ( 1070) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/swansondentalgro/public_html/wp-content/plugins/wp-console/includes/Traits/ |
Upload File : |
<?php
namespace WPConsole\Traits;
/**
* Singleton Trait
*
* @since 1.0.0
*/
trait Singleton {
/**
* Singleton class instance holder
*
* @since 1.0.0
*
* @var object
*/
private static $instance;
/**
* Make a class instance
*
* @since 1.0.0
*
* @return object
*/
public static function instance() {
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof self ) ) {
self::$instance = new self();
if ( method_exists( self::$instance, 'boot' ) ) {
self::$instance->boot();
}
}
return self::$instance;
}
}