Ejemplo n.º 1
0
 public static function getInstance()
 {
     if (empty(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Ejemplo n.º 2
0
 public static function getInstance()
 {
     if (null === self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Ejemplo n.º 3
0
 /**
  * Singleton getter
  *
  * @return Loader
  */
 public static function getInstance()
 {
     // @codeCoverageIgnoreStart
     if (self::$_instance === null) {
         self::$_instance = new self();
     }
     // @codeCoverageIgnoreEnd
     return self::$_instance;
 }
Ejemplo n.º 4
0
 /**
  * create instance if not instance
  *
  * @static
  * @return void
  */
 private static function _checkInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
 }
Ejemplo n.º 5
0
 /**
  * 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;
     }
 }