Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / output / Ext.ClassManager.js
1 Ext.data.JsonP.Ext_ClassManager({
2   "tagname": "class",
3   "name": "Ext.ClassManager",
4   "doc": "<p>Ext.ClassManager manages all classes and handles mapping from string class name to\nactual class objects throughout the whole framework. It is not generally accessed directly, rather through\nthese convenient shorthands:</p>\n\n<ul>\n<li><a href=\"#/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a></li>\n<li><a href=\"#/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a></li>\n<li><a href=\"#/api/Ext-method-widget\" rel=\"Ext-method-widget\" class=\"docClass\">Ext.widget</a></li>\n<li><a href=\"#/api/Ext--getClass\" rel=\"Ext--getClass\" class=\"docClass\">Ext.getClass</a></li>\n<li><a href=\"#/api/Ext-method-getClassName\" rel=\"Ext-method-getClassName\" class=\"docClass\">Ext.getClassName</a></li>\n</ul>\n\n",
5   "extends": null,
6   "mixins": [
7
8   ],
9   "alternateClassNames": [
10
11   ],
12   "xtype": null,
13   "author": "Jacky Nguyen <jacky@sencha.com>",
14   "docauthor": "Jacky Nguyen <jacky@sencha.com>",
15   "singleton": true,
16   "private": false,
17   "cfg": [
18
19   ],
20   "method": [
21     {
22       "tagname": "method",
23       "name": "create",
24       "member": "Ext.ClassManager",
25       "doc": "<p>Defines a class. This is usually invoked via the alias <a href=\"#/api/Ext-method-define\" rel=\"Ext-method-define\" class=\"docClass\">Ext.define</a></p>\n\n<pre><code>Ext.ClassManager.create('My.awesome.Class', {\n    someProperty: 'something',\n    someMethod: function() { ... }\n    ...\n\n}, function() {\n    alert('Created!');\n    alert(this === My.awesome.Class); // alerts true\n\n    var myInstance = new this();\n});\n</code></pre>\n",
26       "params": [
27         {
28           "type": "String",
29           "name": "className",
30           "doc": "<p>The class name to create in string dot-namespaced format, for example:\n'My.very.awesome.Class', 'FeedViewer.plugin.CoolPager'\nIt is highly recommended to follow this simple convention:</p>\n\n<ul>\n<li>The root and the class name are 'CamelCased'</li>\n<li>Everything else is lower-cased</li>\n</ul>\n\n",
31           "optional": false
32         },
33         {
34           "type": "Object",
35           "name": "data",
36           "doc": "<p>The key - value pairs of properties to apply to this class. Property names can be of any valid\nstrings, except those in the reserved listed below:</p>\n\n<ul>\n<li><code>mixins</code></li>\n<li><code>statics</code></li>\n<li><code>config</code></li>\n<li><code>alias</code></li>\n<li><code>self</code></li>\n<li><code>singleton</code></li>\n<li><code>alternateClassName</code></li>\n</ul>\n\n",
37           "optional": false
38         },
39         {
40           "type": "Function",
41           "name": "createdFn",
42           "doc": "<p>Optional callback to execute after the class is created, the execution scope of which\n(<code>this</code>) will be the newly created class itself.</p>\n",
43           "optional": false
44         }
45       ],
46       "return": {
47         "type": "Ext.Base",
48         "doc": "\n"
49       },
50       "private": false,
51       "static": false,
52       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
53       "linenr": 398,
54       "html_filename": "ClassManager.html",
55       "href": "ClassManager.html#Ext-ClassManager-method-create",
56       "shortDoc": "Defines a class. This is usually invoked via the alias Ext.define\n\nExt.ClassManager.create('My.awesome.Class', {\n    ..."
57     },
58     {
59       "tagname": "method",
60       "name": "get",
61       "member": "Ext.ClassManager",
62       "doc": "<p>Retrieve a class by its name.</p>\n",
63       "params": [
64         {
65           "type": "String",
66           "name": "name",
67           "doc": "\n",
68           "optional": false
69         }
70       ],
71       "return": {
72         "type": "Class",
73         "doc": "<p>class</p>\n"
74       },
75       "private": false,
76       "static": false,
77       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
78       "linenr": 257,
79       "html_filename": "ClassManager.html",
80       "href": "ClassManager.html#Ext-ClassManager-method-get",
81       "shortDoc": "<p>Retrieve a class by its name.</p>\n"
82     },
83     {
84       "tagname": "method",
85       "name": "getAliasesByName",
86       "member": "Ext.ClassManager",
87       "doc": "<p>Get the aliases of a class by the class name</p>\n",
88       "params": [
89         {
90           "type": "String",
91           "name": "name",
92           "doc": "\n",
93           "optional": false
94         }
95       ],
96       "return": {
97         "type": "Array",
98         "doc": "<p>aliases</p>\n"
99       },
100       "private": false,
101       "static": false,
102       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
103       "linenr": 358,
104       "html_filename": "ClassManager.html",
105       "href": "ClassManager.html#Ext-ClassManager-method-getAliasesByName",
106       "shortDoc": "<p>Get the aliases of a class by the class name</p>\n"
107     },
108     {
109       "tagname": "method",
110       "name": "getByAlias",
111       "member": "Ext.ClassManager",
112       "doc": "<p>Get a reference to the class by its alias.</p>\n",
113       "params": [
114         {
115           "type": "String",
116           "name": "alias",
117           "doc": "\n",
118           "optional": false
119         }
120       ],
121       "return": {
122         "type": "Class",
123         "doc": "<p>class</p>\n"
124       },
125       "private": false,
126       "static": false,
127       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
128       "linenr": 328,
129       "html_filename": "ClassManager.html",
130       "href": "ClassManager.html#Ext-ClassManager-method-getByAlias",
131       "shortDoc": "<p>Get a reference to the class by its alias.</p>\n"
132     },
133     {
134       "tagname": "method",
135       "name": "getClass",
136       "member": "Ext.ClassManager",
137       "doc": "<p>Get the class of the provided object; returns null if it's not an instance\nof any class created with Ext.define. This is usually invoked by the shorthand <a href=\"#/api/Ext--getClass\" rel=\"Ext--getClass\" class=\"docClass\">Ext.getClass</a></p>\n\n<pre><code>var component = new Ext.Component();\n\nExt.ClassManager.getClass(component); // returns <a href=\"#/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>\n</code></pre>\n",
138       "params": [
139         {
140           "type": "Object",
141           "name": "object",
142           "doc": "\n",
143           "optional": false
144         }
145       ],
146       "return": {
147         "type": "Class",
148         "doc": "<p>class</p>\n"
149       },
150       "private": false,
151       "static": false,
152       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
153       "linenr": 382,
154       "html_filename": "ClassManager.html",
155       "href": "ClassManager.html#Ext-ClassManager-method-getClass",
156       "shortDoc": "Get the class of the provided object; returns null if it's not an instance\nof any class created with Ext.define. This..."
157     },
158     {
159       "tagname": "method",
160       "name": "getDisplayName",
161       "member": "Ext.ClassManager",
162       "doc": "\n",
163       "params": [
164         {
165           "type": "Mixed",
166           "name": "object",
167           "doc": "\n",
168           "optional": false
169         }
170       ],
171       "return": {
172         "type": "void",
173         "doc": "\n"
174       },
175       "private": false,
176       "static": false,
177       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
178       "linenr": 1006,
179       "html_filename": "ClassManager.html",
180       "href": "ClassManager.html#Ext-ClassManager-method-getDisplayName",
181       "shortDoc": "\n"
182     },
183     {
184       "tagname": "method",
185       "name": "getName",
186       "member": "Ext.ClassManager",
187       "doc": "<p>Get the name of the class by its reference or its instance;\nusually invoked by the shorthand <a href=\"#/api/Ext-method-getClassName\" rel=\"Ext-method-getClassName\" class=\"docClass\">Ext.getClassName</a></p>\n\n<pre><code>Ext.ClassManager.getName(Ext.Action); // returns \"Ext.Action\"\n</code></pre>\n",
188       "params": [
189         {
190           "type": "Class/Object",
191           "name": "object",
192           "doc": "\n",
193           "optional": false
194         }
195       ],
196       "return": {
197         "type": "String",
198         "doc": "<p>className</p>\n"
199       },
200       "private": false,
201       "static": false,
202       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
203       "linenr": 368,
204       "html_filename": "ClassManager.html",
205       "href": "ClassManager.html#Ext-ClassManager-method-getName",
206       "shortDoc": "Get the name of the class by its reference or its instance;\nusually invoked by the shorthand Ext.getClassName\n\nExt.Cl..."
207     },
208     {
209       "tagname": "method",
210       "name": "getNameByAlias",
211       "member": "Ext.ClassManager",
212       "doc": "<p>Get the name of a class by its alias.</p>\n",
213       "params": [
214         {
215           "type": "String",
216           "name": "alias",
217           "doc": "\n",
218           "optional": false
219         }
220       ],
221       "return": {
222         "type": "String",
223         "doc": "<p>className</p>\n"
224       },
225       "private": false,
226       "static": false,
227       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
228       "linenr": 338,
229       "html_filename": "ClassManager.html",
230       "href": "ClassManager.html#Ext-ClassManager-method-getNameByAlias",
231       "shortDoc": "<p>Get the name of a class by its alias.</p>\n"
232     },
233     {
234       "tagname": "method",
235       "name": "getNameByAlternate",
236       "member": "Ext.ClassManager",
237       "doc": "<p>Get the name of a class by its alternate name.</p>\n",
238       "params": [
239         {
240           "type": "String",
241           "name": "alternate",
242           "doc": "\n",
243           "optional": false
244         }
245       ],
246       "return": {
247         "type": "String",
248         "doc": "<p>className</p>\n"
249       },
250       "private": false,
251       "static": false,
252       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
253       "linenr": 348,
254       "html_filename": "ClassManager.html",
255       "href": "ClassManager.html#Ext-ClassManager-method-getNameByAlternate",
256       "shortDoc": "<p>Get the name of a class by its alternate name.</p>\n"
257     },
258     {
259       "tagname": "method",
260       "name": "getNamesByExpression",
261       "member": "Ext.ClassManager",
262       "doc": "<p>Converts a string expression to an array of matching class names. An expression can either refers to class aliases\nor class names. Expressions support wildcards:</p>\n\n<pre><code> // returns ['Ext.window.Window']\nvar window = Ext.ClassManager.getNamesByExpression('widget.window');\n\n// returns ['widget.panel', 'widget.window', ...]\nvar allWidgets = Ext.ClassManager.getNamesByExpression('widget.*');\n\n// returns ['Ext.data.Store', 'Ext.data.ArrayProxy', ...]\nvar allData = Ext.ClassManager.getNamesByExpression('Ext.data.*');\n</code></pre>\n",
263       "params": [
264         {
265           "type": "String",
266           "name": "expression",
267           "doc": "\n",
268           "optional": false
269         }
270       ],
271       "return": {
272         "type": "Array",
273         "doc": "<p>classNames</p>\n"
274       },
275       "private": false,
276       "static": false,
277       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
278       "linenr": 769,
279       "html_filename": "ClassManager.html",
280       "href": "ClassManager.html#Ext-ClassManager-method-getNamesByExpression",
281       "shortDoc": "Converts a string expression to an array of matching class names. An expression can either refers to class aliases\nor..."
282     },
283     {
284       "tagname": "method",
285       "name": "instantiate",
286       "member": "Ext.ClassManager",
287       "doc": "<p>Instantiate a class by either full name, alias or alternate name; usually invoked by the convenient\nshorthand <a href=\"#/api/Ext-method-create\" rel=\"Ext-method-create\" class=\"docClass\">Ext.create</a></p>\n\n<p>If <a href=\"#/api/Ext.Loader\" rel=\"Ext.Loader\" class=\"docClass\">Ext.Loader</a> is <a href=\"#/api/Ext.Loader-method-setConfig\" rel=\"Ext.Loader-method-setConfig\" class=\"docClass\">enabled</a> and the class has not been defined yet, it will\nattempt to load the class via synchronous loading.</p>\n\n<p>For example, all these three lines return the same result:</p>\n\n<pre><code>// alias\nvar window = Ext.ClassManager.instantiate('widget.window', { width: 600, height: 800, ... });\n\n// alternate name\nvar window = Ext.ClassManager.instantiate('Ext.Window', { width: 600, height: 800, ... });\n\n// full class name\nvar window = Ext.ClassManager.instantiate('Ext.window.Window', { width: 600, height: 800, ... });\n</code></pre>\n",
288       "params": [
289         {
290           "type": "String",
291           "name": "name",
292           "doc": "\n",
293           "optional": false
294         },
295         {
296           "type": "Mixed",
297           "name": "args",
298           "doc": "<p>,... Additional arguments after the name will be passed to the class' constructor.</p>\n",
299           "optional": false
300         }
301       ],
302       "return": {
303         "type": "Object",
304         "doc": "<p>instance</p>\n"
305       },
306       "private": false,
307       "static": false,
308       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
309       "linenr": 550,
310       "html_filename": "ClassManager.html",
311       "href": "ClassManager.html#Ext-ClassManager-method-instantiate",
312       "shortDoc": "Instantiate a class by either full name, alias or alternate name; usually invoked by the convenient\nshorthand Ext.cre..."
313     },
314     {
315       "tagname": "method",
316       "name": "instantiateByAlias",
317       "member": "Ext.ClassManager",
318       "doc": "<p>Instantiate a class by its alias; usually invoked by the convenient shorthand <a href=\"#/api/Ext-method-createByAlias\" rel=\"Ext-method-createByAlias\" class=\"docClass\">Ext.createByAlias</a>\nIf <a href=\"#/api/Ext.Loader\" rel=\"Ext.Loader\" class=\"docClass\">Ext.Loader</a> is <a href=\"#/api/Ext.Loader-method-setConfig\" rel=\"Ext.Loader-method-setConfig\" class=\"docClass\">enabled</a> and the class has not been defined yet, it will\nattempt to load the class via synchronous loading.</p>\n\n<pre><code>var window = Ext.ClassManager.instantiateByAlias('widget.window', { width: 600, height: 800, ... });\n</code></pre>\n",
319       "params": [
320         {
321           "type": "String",
322           "name": "alias",
323           "doc": "\n",
324           "optional": false
325         },
326         {
327           "type": "Mixed",
328           "name": "args",
329           "doc": "<p>,... Additional arguments after the alias will be passed to the\nclass constructor.</p>\n",
330           "optional": false
331         }
332       ],
333       "return": {
334         "type": "Object",
335         "doc": "<p>instance</p>\n"
336       },
337       "private": false,
338       "static": false,
339       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
340       "linenr": 504,
341       "html_filename": "ClassManager.html",
342       "href": "ClassManager.html#Ext-ClassManager-method-instantiateByAlias",
343       "shortDoc": "Instantiate a class by its alias; usually invoked by the convenient shorthand Ext.createByAlias\nIf Ext.Loader is enab..."
344     },
345     {
346       "tagname": "method",
347       "name": "isCreated",
348       "member": "Ext.ClassManager",
349       "doc": "<p>Checks if a class has already been created.</p>\n",
350       "params": [
351         {
352           "type": "String",
353           "name": "className",
354           "doc": "\n",
355           "optional": false
356         }
357       ],
358       "return": {
359         "type": "Boolean",
360         "doc": "<p>exist</p>\n"
361       },
362       "private": false,
363       "static": false,
364       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
365       "linenr": 70,
366       "html_filename": "ClassManager.html",
367       "href": "ClassManager.html#Ext-ClassManager-method-isCreated",
368       "shortDoc": "<p>Checks if a class has already been created.</p>\n"
369     },
370     {
371       "tagname": "method",
372       "name": "registerPostprocessor",
373       "member": "Ext.ClassManager",
374       "doc": "<p>Register a post-processor function.</p>\n",
375       "params": [
376         {
377           "type": "String",
378           "name": "name",
379           "doc": "\n",
380           "optional": false
381         },
382         {
383           "type": "Function",
384           "name": "postprocessor",
385           "doc": "\n",
386           "optional": false
387         },
388         {
389           "type": "Object",
390           "name": "always",
391           "doc": "\n",
392           "optional": false
393         }
394       ],
395       "return": {
396         "type": "void",
397         "doc": "\n"
398       },
399       "private": false,
400       "static": false,
401       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
402       "linenr": 702,
403       "html_filename": "ClassManager.html",
404       "href": "ClassManager.html#Ext-ClassManager-method-registerPostprocessor",
405       "shortDoc": "<p>Register a post-processor function.</p>\n"
406     },
407     {
408       "tagname": "method",
409       "name": "set",
410       "member": "Ext.ClassManager",
411       "doc": "<p>Sets a name reference to a class.</p>\n",
412       "params": [
413         {
414           "type": "String",
415           "name": "name",
416           "doc": "\n",
417           "optional": false
418         },
419         {
420           "type": "Object",
421           "name": "value",
422           "doc": "\n",
423           "optional": false
424         }
425       ],
426       "return": {
427         "type": "Ext.ClassManager",
428         "doc": "<p>this</p>\n"
429       },
430       "private": false,
431       "static": false,
432       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
433       "linenr": 238,
434       "html_filename": "ClassManager.html",
435       "href": "ClassManager.html#Ext-ClassManager-method-set",
436       "shortDoc": "<p>Sets a name reference to a class.</p>\n"
437     },
438     {
439       "tagname": "method",
440       "name": "setAlias",
441       "member": "Ext.ClassManager",
442       "doc": "<p>Register the alias for a class.</p>\n",
443       "params": [
444         {
445           "type": "Class/String",
446           "name": "cls",
447           "doc": "<p>a reference to a class or a className</p>\n",
448           "optional": false
449         },
450         {
451           "type": "String",
452           "name": "alias",
453           "doc": "<p>Alias to use when referring to this class</p>\n",
454           "optional": false
455         }
456       ],
457       "return": {
458         "type": "void",
459         "doc": "\n"
460       },
461       "private": false,
462       "static": false,
463       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
464       "linenr": 289,
465       "html_filename": "ClassManager.html",
466       "href": "ClassManager.html#Ext-ClassManager-method-setAlias",
467       "shortDoc": "<p>Register the alias for a class.</p>\n"
468     },
469     {
470       "tagname": "method",
471       "name": "setDefaultPostprocessorPosition",
472       "member": "Ext.ClassManager",
473       "doc": "<p>Insert this post-processor at a specific position in the stack, optionally relative to\nany existing post-processor</p>\n",
474       "params": [
475         {
476           "type": "String",
477           "name": "name",
478           "doc": "<p>The post-processor name. Note that it needs to be registered with\n<a href=\"#/api/Ext.ClassManager-method-registerPostprocessor\" rel=\"Ext.ClassManager-method-registerPostprocessor\" class=\"docClass\">registerPostprocessor</a> before this</p>\n",
479           "optional": false
480         },
481         {
482           "type": "String",
483           "name": "offset",
484           "doc": "<p>The insertion position. Four possible values are:\n'first', 'last', or: 'before', 'after' (relative to the name provided in the third argument)</p>\n",
485           "optional": false
486         },
487         {
488           "type": "String",
489           "name": "relativeName",
490           "doc": "\n",
491           "optional": false
492         }
493       ],
494       "return": {
495         "type": "Ext.ClassManager",
496         "doc": "<p>this</p>\n"
497       },
498       "private": false,
499       "static": false,
500       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
501       "linenr": 730,
502       "html_filename": "ClassManager.html",
503       "href": "ClassManager.html#Ext-ClassManager-method-setDefaultPostprocessorPosition",
504       "shortDoc": "<p>Insert this post-processor at a specific position in the stack, optionally relative to\nany existing post-processor</p>\n"
505     },
506     {
507       "tagname": "method",
508       "name": "setDefaultPostprocessors",
509       "member": "Ext.ClassManager",
510       "doc": "<p>Set the default post processors array stack which are applied to every class.</p>\n",
511       "params": [
512         {
513           "type": "String/Array",
514           "name": "The",
515           "doc": "<p>name of a registered post processor or an array of registered names.</p>\n",
516           "optional": false
517         }
518       ],
519       "return": {
520         "type": "Ext.ClassManager",
521         "doc": "<p>this</p>\n"
522       },
523       "private": false,
524       "static": false,
525       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
526       "linenr": 718,
527       "html_filename": "ClassManager.html",
528       "href": "ClassManager.html#Ext-ClassManager-method-setDefaultPostprocessors",
529       "shortDoc": "<p>Set the default post processors array stack which are applied to every class.</p>\n"
530     },
531     {
532       "tagname": "method",
533       "name": "setNamespace",
534       "member": "Ext.ClassManager",
535       "doc": "<p>Creates a namespace and assign the <code>value</code> to the created object</p>\n\n<pre><code>Ext.ClassManager.setNamespace('MyCompany.pkg.Example', someObject);\n\nalert(MyCompany.pkg.Example === someObject); // alerts true\n</code></pre>\n",
536       "params": [
537         {
538           "type": "String",
539           "name": "name",
540           "doc": "\n",
541           "optional": false
542         },
543         {
544           "type": "Mixed",
545           "name": "value",
546           "doc": "\n",
547           "optional": false
548         }
549       ],
550       "return": {
551         "type": "void",
552         "doc": "\n"
553       },
554       "private": false,
555       "static": false,
556       "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
557       "linenr": 173,
558       "html_filename": "ClassManager.html",
559       "href": "ClassManager.html#Ext-ClassManager-method-setNamespace",
560       "shortDoc": "Creates a namespace and assign the value to the created object\n\nExt.ClassManager.setNamespace('MyCompany.pkg.Example'..."
561     }
562   ],
563   "property": [
564
565   ],
566   "event": [
567
568   ],
569   "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/class/ClassManager.js",
570   "linenr": 1,
571   "html_filename": "ClassManager.html",
572   "href": "ClassManager.html#Ext-ClassManager",
573   "cssVar": [
574
575   ],
576   "cssMixin": [
577
578   ],
579   "component": false,
580   "superclasses": [
581
582   ],
583   "subclasses": [
584
585   ],
586   "mixedInto": [
587
588   ],
589   "allMixins": [
590
591   ]
592 });