<?php


namespace CMSMSExt\core;


trait TSingleton
{
  protected static $_instance;
  
  protected function __construct() { }
  protected function __clone() { }
  public function __wakeup() { }
  
  
  /**
   * public methods
   */
  
  public static function getInstance()
  {
    if (null === static::$_instance){ static::$_instance = new static();}
    
    return static::$_instance;
  }
}

?>