3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\r
4 <title>The source code</title>
\r
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
\r
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
\r
8 <body onload="prettyPrint();">
\r
9 <pre class="prettyprint lang-js"><div id="cls-Ext.StoreMgr"></div>/**
11 * @extends Ext.util.MixedCollection
12 * The default global group of stores.
15 Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), {
16 <div id="cfg-Ext.StoreMgr-listeners"></div>/**
17 * @cfg {Object} listeners @hide
20 <div id="method-Ext.StoreMgr-register"></div>/**
21 * Registers one or more Stores with the StoreMgr. You do not normally need to register stores
22 * manually. Any store initialized with a {@link Ext.data.Store#storeId} will be auto-registered.
23 * @param {Ext.data.Store} store1 A Store instance
24 * @param {Ext.data.Store} store2 (optional)
25 * @param {Ext.data.Store} etc... (optional)
27 register : function(){
28 for(var i = 0, s; (s = arguments[i]); i++){
33 <div id="method-Ext.StoreMgr-unregister"></div>/**
34 * Unregisters one or more Stores with the StoreMgr
35 * @param {String/Object} id1 The id of the Store, or a Store instance
36 * @param {String/Object} id2 (optional)
37 * @param {String/Object} etc... (optional)
39 unregister : function(){
40 for(var i = 0, s; (s = arguments[i]); i++){
41 this.remove(this.lookup(s));
45 <div id="method-Ext.StoreMgr-lookup"></div>/**
46 * Gets a registered Store by id
47 * @param {String/Object} id The id of the Store, or a Store instance
48 * @return {Ext.data.Store}
50 lookup : function(id){
52 var fields = ['field1'], expand = !Ext.isArray(id[0]);
54 for(var i = 2, len = id[0].length; i <= len; ++i){
55 fields.push('field' + i);
58 return new Ext.data.ArrayStore({
67 return Ext.isObject(id) ? (id.events ? id : Ext.create(id, 'store')) : this.get(id);
70 // getKey implementation for MixedCollection