public static function getExternInstance($aHost, $aDatabase, $aUser, $aPass, $aRethrow = false) { if (self::$Instance == NULL) { self::$Instance = new Connector($aHost, $aDatabase, $aUser, $aPass, $aRethrow); } else { if (self::$Instance->mHost != $aHost || self::$Instance->mDatabase != $aDatabase) { self::$Instance = NULL; self::$Instance = new Connector($aHost, $aDatabase, $aUser, $aPass, $aRethrow); } } return self::$Instance; }