3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>The source code</title>
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <body onload="prettyPrint();">
9 <pre class="prettyprint lang-js">/*!
10 * Ext JS Library 3.2.1
11 * Copyright(c) 2006-2010 Ext JS, Inc.
13 * http://www.extjs.com/license
15 <div id="cls-Ext.StoreMgr"></div>/**
17 * @extends Ext.util.MixedCollection
18 * The default global group of stores.
21 Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), {
22 <div id="cfg-Ext.StoreMgr-listeners"></div>/**
23 * @cfg {Object} listeners @hide
26 <div id="method-Ext.StoreMgr-register"></div>/**
27 * Registers one or more Stores with the StoreMgr. You do not normally need to register stores
28 * manually. Any store initialized with a {@link Ext.data.Store#storeId} will be auto-registered.
29 * @param {Ext.data.Store} store1 A Store instance
30 * @param {Ext.data.Store} store2 (optional)
31 * @param {Ext.data.Store} etc... (optional)
33 register : function(){
34 for(var i = 0, s; (s = arguments[i]); i++){
39 <div id="method-Ext.StoreMgr-unregister"></div>/**
40 * Unregisters one or more Stores with the StoreMgr
41 * @param {String/Object} id1 The id of the Store, or a Store instance
42 * @param {String/Object} id2 (optional)
43 * @param {String/Object} etc... (optional)
45 unregister : function(){
46 for(var i = 0, s; (s = arguments[i]); i++){
47 this.remove(this.lookup(s));
51 <div id="method-Ext.StoreMgr-lookup"></div>/**
52 * Gets a registered Store by id
53 * @param {String/Object} id The id of the Store, or a Store instance
54 * @return {Ext.data.Store}
56 lookup : function(id){
58 var fields = ['field1'], expand = !Ext.isArray(id[0]);
60 for(var i = 2, len = id[0].length; i <= len; ++i){
61 fields.push('field' + i);
64 return new Ext.data.ArrayStore({
73 return Ext.isObject(id) ? (id.events ? id : Ext.create(id, 'store')) : this.get(id);
76 // getKey implementation for MixedCollection