Beispiel #1
0
 /**
  * Singelton implementation, returns the same instance of SimpleLog
  * @return SimpleLog
  */
 public static function getInstance()
 {
     if (static::$oInstance == null) {
         static::$oInstance = new SimpleLog();
     }
     return static::$oInstance;
 }
Beispiel #2
0
 /**
  *
  * @return Recaptcha
  */
 public static function getInstance()
 {
     if (is_null(static::$oInstance)) {
         static::$oInstance = new static();
     }
     return static::$oInstance;
 }
Beispiel #3
0
 /**
  * @return Storage
  */
 public static function getInstance()
 {
     if (!is_null(static::$oInstance)) {
         return static::$oInstance;
     } else {
         static::$oInstance = new static();
         return static::$oInstance;
     }
 }
Beispiel #4
0
 /**
  * Делает возможным только один экземпляр этого класса
  *
  * @return Router
  */
 public static function getInstance()
 {
     if (isset(static::$oInstance) && static::$oInstance instanceof self) {
         return static::$oInstance;
     } else {
         static::$oInstance = new static();
         return static::$oInstance;
     }
 }