wp_back/wp-content/plugins/smart-slider-3/Nextend/Framework/Pattern/SingletonTrait.php

27 lines
451 B
PHP
Raw Normal View History

2024-05-20 15:37:46 +03:00
<?php
namespace Nextend\Framework\Pattern;
trait SingletonTrait {
protected static $instance;
final public static function getInstance() {
return isset(static::$instance) ? static::$instance : static::$instance = new static;
}
private function __construct() {
$this->init();
}
protected function init() {
}
final public function __wakeup() {
}
final public function __clone() {
}
}