2 * Ext JS Library 2.2.1
\r
3 * Copyright(c) 2006-2009, Ext JS, LLC.
\r
4 * licensing@extjs.com
\r
6 * http://extjs.com/license
\r
10 * @class Ext.StoreMgr
\r
11 * @extends Ext.util.MixedCollection
\r
12 * The default global group of stores.
\r
15 Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), {
\r
17 * @cfg {Object} listeners @hide
\r
21 * Registers one or more Stores with the StoreMgr. You do not normally need to register stores
\r
22 * manually. Any store initialized with a {@link Ext.data.Store#storeId} will be auto-registered.
\r
23 * @param {Ext.data.Store} store1 A Store instance
\r
24 * @param {Ext.data.Store} store2 (optional)
\r
25 * @param {Ext.data.Store} etc... (optional)
\r
27 register : function(){
\r
28 for(var i = 0, s; s = arguments[i]; i++){
\r
34 * Unregisters one or more Stores with the StoreMgr
\r
35 * @param {String/Object} id1 The id of the Store, or a Store instance
\r
36 * @param {String/Object} id2 (optional)
\r
37 * @param {String/Object} etc... (optional)
\r
39 unregister : function(){
\r
40 for(var i = 0, s; s = arguments[i]; i++){
\r
41 this.remove(this.lookup(s));
\r
46 * Gets a registered Store by id
\r
47 * @param {String/Object} id The id of the Store, or a Store instance
\r
48 * @return {Ext.data.Store}
\r
50 lookup : function(id){
\r
51 return typeof id == "object" ? id : this.get(id);
\r
54 // getKey implementation for MixedCollection
\r
55 getKey : function(o){
\r
56 return o.storeId || o.id;
\r