|
|
|
@ -143,7 +143,9 @@
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var callPoint = function (inst, type) { |
|
|
|
|
var callPoint = function (inst, types) { |
|
|
|
|
types = BI.isArray(types) ? types : [types]; |
|
|
|
|
BI.each(types, function (idx, type) { |
|
|
|
|
if (points[type]) { |
|
|
|
|
for (var action in points[type]) { |
|
|
|
|
var bfns = points[type][action].before; |
|
|
|
@ -176,12 +178,14 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
BI.Models = { |
|
|
|
|
getModel: function (type, config) { |
|
|
|
|
var inst = new modelInjection[type](config); |
|
|
|
|
inst._constructor && inst._constructor(config); |
|
|
|
|
inst.mixins && callPoint(inst, inst.mixins); |
|
|
|
|
callPoint(inst, type); |
|
|
|
|
return inst; |
|
|
|
|
} |
|
|
|
|