コード例 #1
0
 public static function getInstance()
 {
     if (empty(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
コード例 #2
0
ファイル: Loader.php プロジェクト: Alexandr93/blog
 public static function getInstance()
 {
     if (null === self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
コード例 #3
0
ファイル: Loader.php プロジェクト: highfidelity/love
 /**
  * Singleton getter
  *
  * @return Loader
  */
 public static function getInstance()
 {
     // @codeCoverageIgnoreStart
     if (self::$_instance === null) {
         self::$_instance = new self();
     }
     // @codeCoverageIgnoreEnd
     return self::$_instance;
 }
コード例 #4
0
ファイル: Loader.php プロジェクト: benms/MK_Framework
 /**
  * create instance if not instance
  *
  * @static
  * @return void
  */
 private static function _checkInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
 }
コード例 #5
0
ファイル: Loader.php プロジェクト: dgilan/test
 /**
  * Unregisters autoload from the system and removes current instance
  */
 public static function destroy()
 {
     if (!is_null(self::$_instance)) {
         spl_autoload_unregister(array(__CLASS__, 'load'));
         self::$_instance = null;
     }
 }