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