refact:compat DoricJSLoaderManager api
This commit is contained in:
parent
844908bdc6
commit
c7de1f90e2
@ -23,6 +23,7 @@ import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import pub.doric.DoricSingleton;
|
||||
import pub.doric.async.AsyncResult;
|
||||
|
||||
/**
|
||||
@ -68,4 +69,8 @@ public class DoricJSLoaderManager {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
public static DoricJSLoaderManager getInstance() {
|
||||
return DoricSingleton.getInstance().getJsLoaderManager();
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,8 @@
|
||||
#import "DoricAsyncResult.h"
|
||||
|
||||
@interface DoricJSLoaderManager : NSObject
|
||||
+ (instancetype)instance;
|
||||
|
||||
- (void)addJSLoader:(id <DoricLoaderProtocol>)loader;
|
||||
|
||||
- (DoricAsyncResult <NSString *> *)request:(NSString *)source;
|
||||
|
@ -24,12 +24,18 @@
|
||||
#import "DoricMainBundleJSLoader.h"
|
||||
#import "DoricHttpJSLoader.h"
|
||||
#import "Doric.h"
|
||||
#import "DoricSingleton.h"
|
||||
|
||||
@interface DoricJSLoaderManager ()
|
||||
@property(nonatomic, copy) NSSet <id <DoricLoaderProtocol>> *loaders;
|
||||
@end
|
||||
|
||||
@implementation DoricJSLoaderManager
|
||||
|
||||
+ (instancetype)instance {
|
||||
return DoricSingleton.instance.jsLoaderManager;
|
||||
}
|
||||
|
||||
- (instancetype)init {
|
||||
if (self = [super init]) {
|
||||
_loaders = [[NSSet alloc] initWithArray:@[
|
||||
|
Reference in New Issue
Block a user