Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / docs / source / StoreManager.html
index 074a055..0b9156e 100644 (file)
@@ -3,8 +3,8 @@
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>The source code</title>
-  <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
-  <script type="text/javascript" src="../prettify/prettify.js"></script>
+  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
   <style type="text/css">
     .highlight { display: block; background-color: #ddd; }
   </style>
 </head>
 <body onload="prettyPrint(); highlight();">
   <pre class="prettyprint lang-js"><span id='Ext-data-StoreManager'>/**
-</span> * @class Ext.data.StoreManager
- * @extends Ext.util.MixedCollection
- * &lt;p&gt;Contains a collection of all stores that are created that have an identifier.
- * An identifier can be assigned by setting the {@link Ext.data.AbstractStore#storeId storeId} 
- * property. When a store is in the StoreManager, it can be referred to via it's identifier:
- * &lt;pre&gt;&lt;code&gt;
-Ext.create('Ext.data.Store', {
-    model: 'SomeModel',
-    storeId: 'myStore'
-});
-
-var store = Ext.data.StoreManager.lookup('myStore');
- * &lt;/code&gt;&lt;/pre&gt;
- * Also note that the {@link #lookup} method is aliased to {@link Ext#getStore} for convenience.&lt;/p&gt;
- * &lt;p&gt;
- * If a store is registered with the StoreManager, you can also refer to the store by it's identifier when
- * registering it with any Component that consumes data from a store:
- * &lt;pre&gt;&lt;code&gt;
-Ext.create('Ext.data.Store', {
-    model: 'SomeModel',
-    storeId: 'myStore'
-});
-
-Ext.create('Ext.view.View', {
-    store: 'myStore',
-    // other configuration here
-});
- * &lt;/code&gt;&lt;/pre&gt;
- * &lt;/p&gt;
- * @singleton
- * @docauthor Evan Trimboli &lt;evan@sencha.com&gt;
- * TODO: Make this an AbstractMgr
+</span> * @docauthor Evan Trimboli &lt;evan@sencha.com&gt;
+ *
+ * Contains a collection of all stores that are created that have an identifier. An identifier can be assigned by
+ * setting the {@link Ext.data.AbstractStore#storeId storeId} property. When a store is in the StoreManager, it can be
+ * referred to via it's identifier:
+ *
+ *     Ext.create('Ext.data.Store', {
+ *         model: 'SomeModel',
+ *         storeId: 'myStore'
+ *     });
+ *
+ *     var store = Ext.data.StoreManager.lookup('myStore');
+ *
+ * Also note that the {@link #lookup} method is aliased to {@link Ext#getStore} for convenience.
+ *
+ * If a store is registered with the StoreManager, you can also refer to the store by it's identifier when registering
+ * it with any Component that consumes data from a store:
+ *
+ *     Ext.create('Ext.data.Store', {
+ *         model: 'SomeModel',
+ *         storeId: 'myStore'
+ *     });
+ *
+ *     Ext.create('Ext.view.View', {
+ *         store: 'myStore',
+ *         // other configuration here
+ *     });
+ *
  */
 Ext.define('Ext.data.StoreManager', {
     extend: 'Ext.util.MixedCollection',
@@ -60,11 +56,9 @@ Ext.define('Ext.data.StoreManager', {
      */
 
 <span id='Ext-data-StoreManager-method-register'>    /**
-</span>     * Registers one or more Stores with the StoreManager. You do not normally need to register stores
-     * manually.  Any store initialized with a {@link Ext.data.Store#storeId} will be auto-registered. 
-     * @param {Ext.data.Store} store1 A Store instance
-     * @param {Ext.data.Store} store2 (optional)
-     * @param {Ext.data.Store} etc... (optional)
+</span>     * Registers one or more Stores with the StoreManager. You do not normally need to register stores manually. Any
+     * store initialized with a {@link Ext.data.Store#storeId} will be auto-registered.
+     * @param {Ext.data.Store...} stores Any number of Store instances
      */
     register : function() {
         for (var i = 0, s; (s = arguments[i]); i++) {
@@ -74,9 +68,7 @@ Ext.define('Ext.data.StoreManager', {
 
 <span id='Ext-data-StoreManager-method-unregister'>    /**
 </span>     * Unregisters one or more Stores with the StoreManager
-     * @param {String/Object} id1 The id of the Store, or a Store instance
-     * @param {String/Object} id2 (optional)
-     * @param {String/Object} etc... (optional)
+     * @param {String/Object...} stores Any number of Store instances or ID-s
      */
     unregister : function() {
         for (var i = 0, s; (s = arguments[i]); i++) {
@@ -86,7 +78,7 @@ Ext.define('Ext.data.StoreManager', {
 
 <span id='Ext-data-StoreManager-method-lookup'>    /**
 </span>     * Gets a registered Store by id
-     * @param {String/Object} id The id of the Store, or a Store instance, or a store configuration
+     * @param {String/Object} store The id of the Store, or a Store instance, or a store configuration
      * @return {Ext.data.Store}
      */
     lookup : function(store) {
@@ -132,22 +124,21 @@ Ext.define('Ext.data.StoreManager', {
     }
 }, function() {    
 <span id='Ext-method-regStore'>    /**
-</span>     * &lt;p&gt;Creates a new store for the given id and config, then registers it with the {@link Ext.data.StoreManager Store Mananger}. 
-     * Sample usage:&lt;/p&gt;
-    &lt;pre&gt;&lt;code&gt;
-    Ext.regStore('AllUsers', {
-        model: 'User'
-    });
-
-    //the store can now easily be used throughout the application
-    new Ext.List({
-        store: 'AllUsers',
-        ... other config
-    });
-    &lt;/code&gt;&lt;/pre&gt;
+</span>     * Creates a new store for the given id and config, then registers it with the {@link Ext.data.StoreManager Store Mananger}. 
+     * Sample usage:
+     *
+     *     Ext.regStore('AllUsers', {
+     *         model: 'User'
+     *     });
+     *
+     *     // the store can now easily be used throughout the application
+     *     new Ext.List({
+     *         store: 'AllUsers',
+     *         ... other config
+     *     });
+     *
      * @param {String} id The id to set on the new store
      * @param {Object} config The store config
-     * @param {Constructor} cls The new Component class.
      * @member Ext
      * @method regStore
      */
@@ -170,11 +161,10 @@ Ext.define('Ext.data.StoreManager', {
     };
 
 <span id='Ext-method-getStore'>    /**
-</span>     * Gets a registered Store by id (shortcut to {@link Ext.data.StoreManager#lookup})
-     * @param {String/Object} id The id of the Store, or a Store instance
-     * @return {Ext.data.Store}
+</span>     * Shortcut to {@link Ext.data.StoreManager#lookup}.
      * @member Ext
      * @method getStore
+     * @alias Ext.data.StoreManager#lookup
      */
     Ext.getStore = function(name) {
         return Ext.data.StoreManager.lookup(name);