/** * 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; }
/** * * @return Recaptcha */ public static function getInstance() { if (is_null(static::$oInstance)) { static::$oInstance = new static(); } return static::$oInstance; }
/** * @return Storage */ public static function getInstance() { if (!is_null(static::$oInstance)) { return static::$oInstance; } else { static::$oInstance = new static(); return static::$oInstance; } }
/** * Делает возможным только один экземпляр этого класса * * @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; } }