<?php


namespace CMSMSExt\core;


abstract class ASingleton
{
  # must be implemented by classes extending this one
  //protected static $_instance;
  
  abstract 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;
  }
}

?>