Skip to content
Browse files

Ext.ClassManager コメント処理

  • Loading branch information...
1 parent 034122e commit f9cfa3f2d3d2e00f0b1d25bfc976fcb03d343904 @sunvisor sunvisor committed Apr 13, 2012
Showing with 290 additions and 218 deletions.
  1. BIN docs/api.conf/locale/en/Ext.Class/config/alias/.desc.md.swp
  2. +20 −0 docs/api.conf/locale/en/Ext.Class/config/alias/desc.md
  3. +14 −0 docs/api.conf/locale/en/Ext.Class/config/alternateClassName/desc.md
  4. +10 −0 docs/api.conf/locale/en/Ext.Class/config/singleton/desc.md
  5. 0 docs/api.conf/locale/en/Ext.ClassManager/doc.md
  6. +5 −0 docs/api.conf/locale/en/Ext.ClassManager/method/create/create/desc.md
  7. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/createNamespaces/desc.md
  8. 0 docs/api.conf/locale/en/Ext.ClassManager/method/dynInstantiate/desc.md
  9. 0 docs/api.conf/locale/en/Ext.ClassManager/method/dynInstantiate/param/args.md
  10. 0 docs/api.conf/locale/en/Ext.ClassManager/method/dynInstantiate/param/name.md
  11. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/get/desc.md
  12. 0 docs/api.conf/locale/en/Ext.ClassManager/method/get/param/name.md
  13. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/get/return.md
  14. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getAliasesByName/desc.md
  15. 0 docs/api.conf/locale/en/Ext.ClassManager/method/getAliasesByName/param/name.md
  16. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getAliasesByName/return.md
  17. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getByAlias/desc.md
  18. 0 docs/api.conf/locale/en/Ext.ClassManager/method/getByAlias/param/alias.md
  19. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getByAlias/return.md
  20. +7 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getClass/desc.md
  21. 0 docs/api.conf/locale/en/Ext.ClassManager/method/getClass/param/object.md
  22. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getClass/return.md
  23. 0 docs/api.conf/locale/en/Ext.ClassManager/method/getInstantiator/desc.md
  24. 0 docs/api.conf/locale/en/Ext.ClassManager/method/getInstantiator/param/length.md
  25. +4 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getName/desc.md
  26. 0 docs/api.conf/locale/en/Ext.ClassManager/method/getName/param/object.md
  27. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getName/return.md
  28. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlias/desc.md
  29. 0 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlias/param/alias.md
  30. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlias/return.md
  31. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlternate/desc.md
  32. 0 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlternate/param/alternate.md
  33. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlternate/return.md
  34. +11 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getNamesByExpression/desc.md
  35. 0 docs/api.conf/locale/en/Ext.ClassManager/method/getNamesByExpression/param/expression.md
  36. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/getNamesByExpression/return.md
  37. +10 −0 docs/api.conf/locale/en/Ext.ClassManager/method/instantiateByAlias/desc.md
  38. 0 docs/api.conf/locale/en/Ext.ClassManager/method/instantiateByAlias/param/alias.md
  39. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/instantiateByAlias/param/args.md
  40. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/instantiateByAlias/return.md
  41. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/isCreated/desc.md
  42. 0 docs/api.conf/locale/en/Ext.ClassManager/method/isCreated/param/className.md
  43. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/isCreated/return.md
  44. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/registerPostprocessor/desc.md
  45. 0 docs/api.conf/locale/en/Ext.ClassManager/method/registerPostprocessor/param/name.md
  46. 0 docs/api.conf/locale/en/Ext.ClassManager/method/registerPostprocessor/param/postprocessor.md
  47. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/set/desc.md
  48. 0 docs/api.conf/locale/en/Ext.ClassManager/method/set/param/name.md
  49. 0 docs/api.conf/locale/en/Ext.ClassManager/method/set/param/value.md
  50. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/set/return.md
  51. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setAlias/desc.md
  52. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setAlias/param/alias.md
  53. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setAlias/param/cls.md
  54. +2 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessorPosition/desc.md
  55. +3 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessorPosition/param/name.md
  56. +2 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessorPosition/param/offset.md
  57. 0 .../api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessorPosition/param/relativeName.md
  58. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessorPosition/return.md
  59. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessors/desc.md
  60. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessors/param/postprocessors.md
  61. +1 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessors/return.md
  62. +6 −0 docs/api.conf/locale/en/Ext.ClassManager/method/setNamespace/desc.md
  63. 0 docs/api.conf/locale/en/Ext.ClassManager/method/setNamespace/param/name.md
  64. 0 docs/api.conf/locale/en/Ext.ClassManager/method/setNamespace/param/value.md
  65. +2 −0 docs/api.conf/locale/en/Ext.ClassManager/property/classes/desc.md
  66. +39 −0 docs/api.conf/locale/en/Ext/method/create/desc.md
  67. +2 −0 docs/api.conf/locale/en/Ext/method/create/param/args.md
  68. +2 −0 docs/api.conf/locale/en/Ext/method/create/param/name.md
  69. +1 −0 docs/api.conf/locale/en/Ext/method/create/return.md
  70. +2 −0 docs/api.conf/locale/en/Ext/method/createByAlias/desc.md
  71. +5 −0 docs/api.conf/locale/en/Ext/method/define/param/className.md
  72. +2 −0 docs/api.conf/locale/en/Ext/method/define/param/createdFn.md
  73. +10 −0 docs/api.conf/locale/en/Ext/method/define/param/data.md
  74. 0 docs/api.conf/locale/en/Ext/method/define/return.md
  75. +2 −0 docs/api.conf/locale/en/Ext/method/getClass/desc.md
  76. +1 −0 docs/api.conf/locale/en/Ext/method/getClassName/desc.md
  77. 0 docs/api.conf/locale/en/Ext/method/getClassName/param/object.md
  78. 0 docs/api.conf/locale/en/Ext/method/getClassName/return.md
  79. +2 −1 docs/api.conf/locale/en/Ext/method/merge/desc.md
  80. +12 −0 docs/api.conf/locale/en/Ext/method/namespace/desc.md
  81. 0 docs/api.conf/locale/en/Ext/method/namespace/param/namespaces.md
  82. +2 −0 docs/api.conf/locale/en/Ext/method/namespace/return.md
  83. +2 −0 docs/api.conf/locale/en/Ext/method/ns/desc.md
  84. +3 −2 docs/api.conf/locale/en/Ext/method/valueFrom/desc.md
  85. +79 −215 lib/ext-server/class/ClassManager.js
View
BIN docs/api.conf/locale/en/Ext.Class/config/alias/.desc.md.swp
Binary file not shown.
View
20 docs/api.conf/locale/en/Ext.Class/config/alias/desc.md
@@ -0,0 +1,20 @@
+List of short aliases for class names. Most useful for defining xtypes for widgets:
+
+ Ext.define('MyApp.CoolPanel', {
+ extend: 'Ext.panel.Panel',
+ alias: ['widget.coolpanel'],
+ title: 'Yeah!'
+ });
+
+ // Using Ext.create
+ Ext.create('widget.coolpanel');
+
+ // Using the shorthand for defining widgets by xtype
+ Ext.widget('panel', {
+ items: [
+ {xtype: 'coolpanel', html: 'Foo'},
+ {xtype: 'coolpanel', html: 'Bar'}
+ ]
+ });
+
+Besides "widget" for xtype there are alias namespaces like "feature" for ftype and "plugin" for ptype.
View
14 docs/api.conf/locale/en/Ext.Class/config/alternateClassName/desc.md
@@ -0,0 +1,14 @@
+Defines alternate names for this class. For example:
+
+ Ext.define('Developer', {
+ alternateClassName: ['Coder', 'Hacker'],
+ code: function(msg) {
+ alert('Typing... ' + msg);
+ }
+ });
+
+ var joe = Ext.create('Developer');
+ joe.code('stackoverflow');
+
+ var rms = Ext.create('Hacker');
+ rms.code('hack hack');
View
10 docs/api.conf/locale/en/Ext.Class/config/singleton/desc.md
@@ -0,0 +1,10 @@
+When set to true, the class will be instantiated as singleton. For example:
+
+ Ext.define('Logger', {
+ singleton: true,
+ log: function(msg) {
+ console.log(msg);
+ }
+ });
+
+ Logger.log('Hello');
View
0 docs/api.conf/locale/en/Ext.ClassManager/doc.md
No changes.
View
5 docs/api.conf/locale/en/Ext.ClassManager/method/create/create/desc.md
@@ -0,0 +1,5 @@
+Defines a class.
+
+@deprecated 4.1.0 Use
+<a href="#!/api/Ext-method-define" rel="Ext-method-define" class="docClass" id="ext-gen1325">Ext.define</a>
+instead, as that also supports creating overrides.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/createNamespaces/desc.md
@@ -0,0 +1 @@
+The new Ext.ns, supports namespace rewriting
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/dynInstantiate/desc.md
No changes.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/dynInstantiate/param/args.md
No changes.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/dynInstantiate/param/name.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/get/desc.md
@@ -0,0 +1 @@
+Retrieve a class by its name.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/get/param/name.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/get/return.md
@@ -0,0 +1 @@
+class
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getAliasesByName/desc.md
@@ -0,0 +1 @@
+Get the aliases of a class by the class name
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/getAliasesByName/param/name.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getAliasesByName/return.md
@@ -0,0 +1 @@
+aliases
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getByAlias/desc.md
@@ -0,0 +1 @@
+Get a reference to the class by its alias.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/getByAlias/param/alias.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getByAlias/return.md
@@ -0,0 +1 @@
+class
View
7 docs/api.conf/locale/en/Ext.ClassManager/method/getClass/desc.md
@@ -0,0 +1,7 @@
+Get the class of the provided object; returns null if it's not an instance
+of any class created with Ext.define. This is usually invoked by the shorthand
+<a href="#!/api/Ext-method-getClass" rel="Ext-method-getClass" class="docClass" id="ext-gen1292">Ext.getClass</a>
+
+ var component = new Ext.Component();
+
+ Ext.ClassManager.getClass(component); // returns Ext.Component
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/getClass/param/object.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getClass/return.md
@@ -0,0 +1 @@
+class
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/getInstantiator/desc.md
No changes.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/getInstantiator/param/length.md
No changes.
View
4 docs/api.conf/locale/en/Ext.ClassManager/method/getName/desc.md
@@ -0,0 +1,4 @@
+Get the name of the class by its reference or its instance;
+usually invoked by the shorthand {@link Ext#getClassName Ext.getClassName}
+
+ Ext.ClassManager.getName(Ext.Action); // returns "Ext.Action"
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/getName/param/object.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getName/return.md
@@ -0,0 +1 @@
+className
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlias/desc.md
@@ -0,0 +1 @@
+Get the name of a class by its alias.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlias/param/alias.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlias/return.md
@@ -0,0 +1 @@
+className
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlternate/desc.md
@@ -0,0 +1 @@
+Get the name of a class by its alternate name.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlternate/param/alternate.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getNameByAlternate/return.md
@@ -0,0 +1 @@
+className
View
11 docs/api.conf/locale/en/Ext.ClassManager/method/getNamesByExpression/desc.md
@@ -0,0 +1,11 @@
+Converts a string expression to an array of matching class names. An expression can either refers to class aliases
+or class names. Expressions support wildcards:
+
+ // returns ['Ext.window.Window']
+ var window = Ext.ClassManager.getNamesByExpression('widget.window');
+
+ // returns ['widget.panel', 'widget.window', ...]
+ var allWidgets = Ext.ClassManager.getNamesByExpression('widget.*');
+
+ // returns ['Ext.data.Store', 'Ext.data.ArrayProxy', ...]
+ var allData = Ext.ClassManager.getNamesByExpression('Ext.data.*');
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/getNamesByExpression/param/expression.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/getNamesByExpression/return.md
@@ -0,0 +1 @@
+classNames
View
10 docs/api.conf/locale/en/Ext.ClassManager/method/instantiateByAlias/desc.md
@@ -0,0 +1,10 @@
+Instantiate a class by its alias; usually invoked by the convenient shorthand
+<a href="#!/api/Ext-method-createByAlias" rel="Ext-method-createByAlias" class="docClass" id="ext-gen1353">Ext.createByAlias</a>
+If
+<a href="#!/api/Ext.Loader" rel="Ext.Loader" class="docClass" id="ext-gen1357">Ext.Loader</a>
+is
+<a href="#!/api/Ext.Loader-method-setConfig" rel="Ext.Loader-method-setConfig" class="docClass" id="ext-gen1351">enabled</a>
+and the class has not been defined yet, it will
+attempt to load the class via synchronous loading.
+
+ var window = Ext.ClassManager.instantiateByAlias('widget.window', { width: 600, height: 800, ... });
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/instantiateByAlias/param/alias.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/instantiateByAlias/param/args.md
@@ -0,0 +1 @@
+Additional arguments after the alias will be passed to the class constructor.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/instantiateByAlias/return.md
@@ -0,0 +1 @@
+instance
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/isCreated/desc.md
@@ -0,0 +1 @@
+Checks if a class has already been created.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/isCreated/param/className.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/isCreated/return.md
@@ -0,0 +1 @@
+exist
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/registerPostprocessor/desc.md
@@ -0,0 +1 @@
+Register a post-processor function.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/registerPostprocessor/param/name.md
No changes.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/registerPostprocessor/param/postprocessor.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/set/desc.md
@@ -0,0 +1 @@
+Sets a name reference to a class.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/set/param/name.md
No changes.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/set/param/value.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/set/return.md
@@ -0,0 +1 @@
+this
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/setAlias/desc.md
@@ -0,0 +1 @@
+Register the alias for a class.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/setAlias/param/alias.md
@@ -0,0 +1 @@
+Alias to use when referring to this class
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/setAlias/param/cls.md
@@ -0,0 +1 @@
+a reference to a class or a className
View
2 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessorPosition/desc.md
@@ -0,0 +1,2 @@
+Insert this post-processor at a specific position in the stack, optionally relative to
+any existing post-processor
View
3 .../api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessorPosition/param/name.md
@@ -0,0 +1,3 @@
+The post-processor name. Note that it needs to be registered with
+<a href="#!/api/Ext.ClassManager-method-registerPostprocessor" rel="Ext.ClassManager-method-registerPostprocessor" class="docClass">registerPostprocessor</a>
+before this
View
2 ...pi.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessorPosition/param/offset.md
@@ -0,0 +1,2 @@
+The insertion position. Four possible values are:
+'first', 'last', or: 'before', 'after' (relative to the name provided in the third argument)
View
0 ...f/locale/en/Ext.ClassManager/method/setDefaultPostprocessorPosition/param/relativeName.md
No changes.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessorPosition/return.md
@@ -0,0 +1 @@
+this
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessors/desc.md
@@ -0,0 +1 @@
+Set the default post processors array stack which are applied to every class.
View
1 ...i.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessors/param/postprocessors.md
@@ -0,0 +1 @@
+The name of a registered post processor or an array of registered names.
View
1 docs/api.conf/locale/en/Ext.ClassManager/method/setDefaultPostprocessors/return.md
@@ -0,0 +1 @@
+this
View
6 docs/api.conf/locale/en/Ext.ClassManager/method/setNamespace/desc.md
@@ -0,0 +1,6 @@
+Creates a namespace and assign the `value` to the created object
+
+ Ext.ClassManager.setNamespace('MyCompany.pkg.Example', someObject);
+
+ alert(MyCompany.pkg.Example === someObject); // alerts true
+
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/setNamespace/param/name.md
No changes.
View
0 docs/api.conf/locale/en/Ext.ClassManager/method/setNamespace/param/value.md
No changes.
View
2 docs/api.conf/locale/en/Ext.ClassManager/property/classes/desc.md
@@ -0,0 +1,2 @@
+All classes which were defined through the ClassManager. Keys are the
+name of the classes and the values are references to the classes.
View
39 docs/api.conf/locale/en/Ext/method/create/desc.md
@@ -0,0 +1,39 @@
+Instantiate a class by either full name, alias or alternate name.
+
+If
+<a href="#!/api/Ext.Loader" rel="Ext.Loader" class="docClass" id="ext-gen1442">Ext.Loader</a>
+is
+<a href="#!/api/Ext.Loader-method-setConfig" rel="Ext.Loader-method-setConfig" class="docClass" id="ext-gen1340">enabled</a>
+and the class has
+not been defined yet, it will attempt to load the class via synchronous loading.
+
+For example, all these three lines return the same result:
+
+ // alias
+ var window = Ext.create('widget.window', {
+ width: 600,
+ height: 800,
+ ...
+ });
+
+ // alternate name
+ var window = Ext.create('Ext.Window', {
+ width: 600,
+ height: 800,
+ ...
+ });
+
+ // full class name
+ var window = Ext.create('Ext.window.Window', {
+ width: 600,
+ height: 800,
+ ...
+ });
+
+ // single object with xclass property:
+ var window = Ext.create({
+ xclass: 'Ext.window.Window', // any valid value for 'name' (above)
+ width: 600,
+ height: 800,
+ ...
+ });
View
2 docs/api.conf/locale/en/Ext/method/create/param/args.md
@@ -0,0 +1,2 @@
+Additional arguments after the name will be passed to
+the class' constructor.
View
2 docs/api.conf/locale/en/Ext/method/create/param/name.md
@@ -0,0 +1,2 @@
+The class name or alias. Can be specified as `xclass`
+property if only one object parameter is specified.
View
1 docs/api.conf/locale/en/Ext/method/create/return.md
@@ -0,0 +1 @@
+instance
View
2 docs/api.conf/locale/en/Ext/method/createByAlias/desc.md
@@ -0,0 +1,2 @@
+Convenient shorthand, see
+<a href="#!/api/Ext.ClassManager-method-instantiateByAlias" rel="Ext.ClassManager-method-instantiateByAlias" class="docClass" id="ext-gen1357">Ext.ClassManager.instantiateByAlias</a>
View
5 docs/api.conf/locale/en/Ext/method/define/param/className.md
@@ -0,0 +1,5 @@
+The class name to create in string dot-namespaced format, for example:
+'My.very.awesome.Class', 'FeedViewer.plugin.CoolPager'
+It is highly recommended to follow this simple convention:
+ - The root and the class name are 'CamelCased'
+ - Everything else is lower-cased
View
2 docs/api.conf/locale/en/Ext/method/define/param/createdFn.md
@@ -0,0 +1,2 @@
+Optional callback to execute after the class is created, the execution scope of which
+(`this`) will be the newly created class itself.
View
10 docs/api.conf/locale/en/Ext/method/define/param/data.md
@@ -0,0 +1,10 @@
+The key - value pairs of properties to apply to this class. Property names can be of any valid
+strings, except those in the reserved listed below:
+ - `mixins`
+ - `statics`
+ - `config`
+ - `alias`
+ - `self`
+ - `singleton`
+ - `alternateClassName`
+ - `override`
View
0 docs/api.conf/locale/en/Ext/method/define/return.md
No changes.
View
2 docs/api.conf/locale/en/Ext/method/getClass/desc.md
@@ -0,0 +1,2 @@
+Convenient shorthand, see
+<a href="#!/api/Ext.ClassManager-method-getClass" rel="Ext.ClassManager-method-getClass" class="docClass" id="ext-gen1384">Ext.ClassManager.getClass</a>
View
1 docs/api.conf/locale/en/Ext/method/getClassName/desc.md
@@ -0,0 +1 @@
+Returns the displayName property or className or object. When all else fails, returns "Anonymous".
View
0 docs/api.conf/locale/en/Ext/method/getClassName/param/object.md
No changes.
View
0 docs/api.conf/locale/en/Ext/method/getClassName/return.md
No changes.
View
3 docs/api.conf/locale/en/Ext/method/merge/desc.md
@@ -1 +1,2 @@
-A convenient alias method for {@link Ext.Object#merge}.
+A convenient alias method for
+<a href="#!/api/Ext.Object-method-merge" rel="Ext.Object-method-merge" class="docClass" id="ext-gen1465">Ext.Object.merge</a>
View
12 docs/api.conf/locale/en/Ext/method/namespace/desc.md
@@ -0,0 +1,12 @@
+Creates namespaces to be used for scoping variables and classes so that they are not global.
+Specifying the last node of a namespace implicitly creates all other nodes. Usage:
+
+ Ext.namespace('Company', 'Company.data');
+
+ // equivalent and preferable to the above syntax
+ Ext.ns('Company.data');
+
+ Company.Widget = function() { ... };
+
+ Company.data.CustomStore = function(config) { ... };
+
View
0 docs/api.conf/locale/en/Ext/method/namespace/param/namespaces.md
No changes.
View
2 docs/api.conf/locale/en/Ext/method/namespace/return.md
@@ -0,0 +1,2 @@
+The namespace object.
+(If multiple arguments are passed, this will be the last namespace created)
View
2 docs/api.conf/locale/en/Ext/method/ns/desc.md
@@ -0,0 +1,2 @@
+Convenient alias for
+<a href="#!/api/Ext-method-namespace" rel="Ext-method-namespace" class="docClass" id="ext-gen1424">Ext.namespace</a>
View
5 docs/api.conf/locale/en/Ext/method/valueFrom/desc.md
@@ -1,2 +1,3 @@
-Returns the given value itself if it's not empty, as described in {@link Ext#isEmpty}; returns the default
-value (second argument) otherwise.
+Returns the given value itself if it's not empty, as described in
+<a href="#!/api/Ext-method-isEmpty" rel="Ext-method-isEmpty" class="docClass" id="ext-gen1503">isEmpty</a>;
+returns the default value (second argument) otherwise.
View
294 lib/ext-server/class/ClassManager.js
@@ -22,8 +22,7 @@
/**
* @property {Object} classes
- * All classes which were defined through the ClassManager. Keys are the
- * name of the classes and the values are references to the classes.
+ * {Ext_ClassManager:property-classes:desc}
* @private
*/
classes: {},
@@ -83,10 +82,10 @@
// {{{ isCreated
/**
- * Checks if a class has already been created.
+ * {Ext_ClassManager:method-isCreated:desc}
*
- * @param {String} className
- * @return {Boolean} exist
+ * @param {String} className {Ext_ClassManager:method-isCreated:param_className}
+ * @return {Boolean} {Ext_ClassManager:method-isCreated:return}
*/
isCreated: function(className) {
@@ -262,14 +261,9 @@
// {{{ setNamespace
/**
- * Creates a namespace and assign the `value` to the created object
- *
- * Ext.ClassManager.setNamespace('MyCompany.pkg.Example', someObject);
- *
- * alert(MyCompany.pkg.Example === someObject); // alerts true
- *
- * @param {String} name
- * @param {Object} value
+ * {Ext_ClassManager:method-setNamespace:desc}
+ * @param {String} name {Ext_ClassManager:method-setNamespace:param_name}
+ * @param {Object} value {Ext_ClassManager:method-setNamespace:param_value}
*/
setNamespace: function(name, value) {
var root = global,
@@ -301,7 +295,7 @@
// {{{ createNamespaces
/**
- * The new Ext.ns, supports namespace rewriting
+ * {Ext_ClassManager:method-createNamespaces:desc}
* @private
*/
createNamespaces: function() {
@@ -333,11 +327,11 @@
// {{{ set
/**
- * Sets a name reference to a class.
+ * {Ext_ClassManager:method-set:desc}
*
- * @param {String} name
- * @param {Object} value
- * @return {Ext.ClassManager} this
+ * @param {String} name {Ext_ClassManager:method-set:param_name}
+ * @param {Object} value {Ext_ClassManager:method-set:param_value}
+ * @return {Ext.ClassManager} {Ext_ClassManager:method-set:return}
*/
set: function(name, value) {
var me = this,
@@ -361,10 +355,10 @@
// {{{ get
/**
- * Retrieve a class by its name.
+ * {Ext_ClassManager:method-get:desc}
*
- * @param {String} name
- * @return {Ext.Class} class
+ * @param {String} name {Ext_ClassManager:method-get:param_name}
+ * @return {Ext.Class} {Ext_ClassManager:method-get:param_class}
*/
get: function(name) {
var classes = this.classes,
@@ -400,10 +394,10 @@
// {{{ setAlias
/**
- * Register the alias for a class.
+ * {Ext_ClassManager:method-setAlias:desc}
*
- * @param {Ext.Class/String} cls a reference to a class or a className
- * @param {String} alias Alias to use when referring to this class
+ * @param {Ext.Class/String} cls {Ext_ClassManager:method-setAlias:param_cls}
+ * @param {String} alias {Ext_ClassManager:method-setAlias:param_alias}
*/
setAlias: function(cls, alias) {
var aliasToNameMap = this.maps.aliasToName,
@@ -442,10 +436,10 @@
// {{{ getByAlias
/**
- * Get a reference to the class by its alias.
+ * {Ext_ClassManager:method-getByAlias:desc}
*
- * @param {String} alias
- * @return {Ext.Class} class
+ * @param {String} alias {Ext_ClassManager:method-getByAlias:param_alias}
+ * @return {Ext.Class} {Ext_ClassManager:method-getByAlias:return}
*/
getByAlias: function(alias) {
return this.get(this.getNameByAlias(alias));
@@ -455,10 +449,10 @@
// {{{ getNameByAlias
/**
- * Get the name of a class by its alias.
+ * {Ext_ClassManager:method-getNameByAlias:desc}
*
- * @param {String} alias
- * @return {String} className
+ * @param {String} alias {Ext_ClassManager:method-getNameByAlias:param_alias}
+ * @return {String} {Ext_ClassManager:method-getNameByAlias:return}
*/
getNameByAlias: function(alias) {
return this.maps.aliasToName[alias] || '';
@@ -468,10 +462,10 @@
// {{{ getNameByAlternate
/**
- * Get the name of a class by its alternate name.
+ * {Ext_ClassManager:method-getNameByAlternate:desc}
*
- * @param {String} alternate
- * @return {String} className
+ * @param {String} alternate {Ext_ClassManager:method-getNameByAlternate:param_alternate}
+ * @return {String} {Ext_ClassManager:method-getNameByAlternate:return}
*/
getNameByAlternate: function(alternate) {
return this.maps.alternateToName[alternate] || '';
@@ -481,10 +475,10 @@
// {{{ getAliasesByName
/**
- * Get the aliases of a class by the class name
+ * {Ext_ClassManager:method-getAliasesByName:desc}
*
- * @param {String} name
- * @return {Array} aliases
+ * @param {String} name {Ext_ClassManager:method-getAliasesByName:param_name}
+ * @return {Array} {Ext_ClassManager:method-getAliasesByName:return}
*/
getAliasesByName: function(name) {
return this.maps.nameToAliases[name] || [];
@@ -494,13 +488,10 @@
// {{{ getName
/**
- * Get the name of the class by its reference or its instance;
- * usually invoked by the shorthand {@link Ext#getClassName Ext.getClassName}
+ * {Ext_ClassManager:method-getName:desc}
*
- * Ext.ClassManager.getName(Ext.Action); // returns "Ext.Action"
- *
- * @param {Ext.Class/Object} object
- * @return {String} className
+ * @param {Ext.Class/Object} object {Ext_ClassManager:method-getName:desc}
+ * @return {String} {Ext_ClassManager:method-getName:desc}
*/
getName: function(object) {
return object && object.$className || '';
@@ -510,15 +501,10 @@
// {{{ getClass
/**
- * Get the class of the provided object; returns null if it's not an instance
- * of any class created with Ext.define. This is usually invoked by the shorthand {@link Ext#getClass Ext.getClass}
- *
- * var component = new Ext.Component();
- *
- * Ext.ClassManager.getClass(component); // returns Ext.Component
+ * {Ext_ClassManager:method-getClass:desc}
*
- * @param {Object} object
- * @return {Ext.Class} class
+ * @param {Object} object {Ext_ClassManager:method-getClass:param_object}
+ * @return {Ext.Class} {Ext_ClassManager:method-getClass:return}
*/
getClass: function(object) {
return object && object.self || null;
@@ -549,9 +535,7 @@
// {{{ create
/**
- * Defines a class.
- *
- * @deprecated 4.1.0 Use {@link Ext#define} instead, as that also supports creating overrides.
+ * {Ext_ClassManager:method-create:desc}
*/
create: function(className, data, createdFn) {
@@ -698,16 +682,11 @@
// {{{ instantiateByAlias
/**
- * Instantiate a class by its alias; usually invoked by the convenient shorthand {@link Ext#createByAlias Ext.createByAlias}
- * If {@link Ext.Loader} is {@link Ext.Loader#setConfig enabled} and the class has not been defined yet, it will
- * attempt to load the class via synchronous loading.
- *
- * var window = Ext.ClassManager.instantiateByAlias('widget.window', { width: 600, height: 800, ... });
+ * {Ext_ClassManager:method-instantiateByAlias:desc}
*
- * @param {String} alias
- * @param {Object...} args Additional arguments after the alias will be passed to the
- * class constructor.
- * @return {Object} instance
+ * @param {String} alias {Ext_ClassManager:method-instantiateByAlias:param_alias}
+ * @param {Object...} args {Ext_ClassManager:method-instantiateByAlias:param_args}
+ * @return {Object} {Ext_ClassManager:method-instantiateByAlias:return}
*/
instantiateByAlias: function() {
var alias = arguments[0],
@@ -792,9 +771,10 @@
// {{{ dynInstantiate
/**
+ * {Ext_ClassManager:method-dynInstantiate:desc}
* @private
- * @param name
- * @param args
+ * @param name {Ext_ClassManager:method-dynInstantiate:param_name}
+ * @param args {Ext_ClassManager:method-dynInstantiate:param_args}
*/
dynInstantiate: function(name, args) {
args = arrayFrom(args, true);
@@ -807,8 +787,9 @@
// {{{ getInstantiator
/**
+ * {Ext_ClassManager:method-getInstantiator:desc}
* @private
- * @param length
+ * @param length {Ext_ClassManager:method-getInstantiator:param_length}
*/
getInstantiator: function(length) {
var instantiators = this.instantiators,
@@ -855,11 +836,11 @@
// {{{ registerPostprocessor
/**
- * Register a post-processor function.
+ * {Ext_ClassManager:registerPostprocessor:desc}
*
* @private
- * @param {String} name
- * @param {Function} postprocessor
+ * @param {String} name {Ext_ClassManager:registerPostprocessor:param_name}
+ * @param {Function} postprocessor {Ext_ClassManager:registerPostprocessor:param_postprocessor}
*/
registerPostprocessor: function(name, fn, properties, position, relativeTo) {
if(!position) {
@@ -885,11 +866,11 @@
// {{{ setDefaultPostprocessors
/**
- * Set the default post processors array stack which are applied to every class.
+ * {Ext_ClassManager:method-setDefaultPostprocessors:desc}
*
* @private
- * @param {String/Array} The name of a registered post processor or an array of registered names.
- * @return {Ext.ClassManager} this
+ * @param {String/Array} postprocessors {Ext_ClassManager:method-setDefaultPostprocessors:desc}
+ * @return {Ext.ClassManager} {Ext_ClassManager:method-setDefaultPostprocessors:desc}
*/
setDefaultPostprocessors: function(postprocessors) {
this.defaultPostprocessors = arrayFrom(postprocessors);
@@ -901,16 +882,13 @@
// {{{ setDefaultPostprocessorPosition
/**
- * Insert this post-processor at a specific position in the stack, optionally relative to
- * any existing post-processor
+ * {Ext_ClassManager:method-setDefaultPostprocessorPosition:desc}
*
* @private
- * @param {String} name The post-processor name. Note that it needs to be registered with
- * {@link Ext.ClassManager#registerPostprocessor} before this
- * @param {String} offset The insertion position. Four possible values are:
- * 'first', 'last', or: 'before', 'after' (relative to the name provided in the third argument)
- * @param {String} relativeName
- * @return {Ext.ClassManager} this
+ * @param {String} name {Ext_ClassManager:method-setDefaultPostprocessorPosition:desc}
+ * @param {String} offset {Ext_ClassManager:method-setDefaultPostprocessorPosition:desc}
+ * @param {String} relativeName {Ext_ClassManager:method-setDefaultPostprocessorPosition:desc}
+ * @return {Ext.ClassManager} {Ext_ClassManager:method-setDefaultPostprocessorPosition:desc}
*/
setDefaultPostprocessorPosition: function(name, offset, relativeName) {
var defaultPostprocessors = this.defaultPostprocessors,
@@ -944,20 +922,10 @@
// {{{ getNamesByExpression
/**
- * Converts a string expression to an array of matching class names. An expression can either refers to class aliases
- * or class names. Expressions support wildcards:
- *
- * // returns ['Ext.window.Window']
- * var window = Ext.ClassManager.getNamesByExpression('widget.window');
+ * {Ext_ClassManager:method-getNamesByExpression:desc}
*
- * // returns ['widget.panel', 'widget.window', ...]
- * var allWidgets = Ext.ClassManager.getNamesByExpression('widget.*');
- *
- * // returns ['Ext.data.Store', 'Ext.data.ArrayProxy', ...]
- * var allData = Ext.ClassManager.getNamesByExpression('Ext.data.*');
- *
- * @param {String} expression
- * @return {String[]} classNames
+ * @param {String} expression {Ext_ClassManager:method-getNamesByExpression:param_expression}
+ * @return {String[]} {Ext_ClassManager:method-getNamesByExpression:return}
*/
getNamesByExpression: function(expression) {
@@ -1013,26 +981,7 @@
/**
* @cfg {String[]} alias
* @member Ext.Class
- * List of short aliases for class names. Most useful for defining xtypes for widgets:
- *
- * Ext.define('MyApp.CoolPanel', {
- * extend: 'Ext.panel.Panel',
- * alias: ['widget.coolpanel'],
- * title: 'Yeah!'
- * });
- *
- * // Using Ext.create
- * Ext.create('widget.coolpanel');
- *
- * // Using the shorthand for defining widgets by xtype
- * Ext.widget('panel', {
- * items: [
- * {xtype: 'coolpanel', html: 'Foo'},
- * {xtype: 'coolpanel', html: 'Bar'}
- * ]
- * });
- *
- * Besides "widget" for xtype there are alias namespaces like "feature" for ftype and "plugin" for ptype.
+ * {Ext_Class:config-alias:desc}
*/
Manager.registerPostprocessor('alias', function(name, cls, data) {
var aliases = data.alias,
@@ -1051,16 +1000,7 @@
/**
* @cfg {Boolean} singleton
* @member Ext.Class
- * When set to true, the class will be instantiated as singleton. For example:
- *
- * Ext.define('Logger', {
- * singleton: true,
- * log: function(msg) {
- * console.log(msg);
- * }
- * });
- *
- * Logger.log('Hello');
+ * {Ext_Class:config-singleton:desc}
*/
Manager.registerPostprocessor('singleton', function(name, cls, data, fn) {
fn.call(this, name, new cls(), data);
@@ -1072,20 +1012,7 @@
/**
* @cfg {String/String[]} alternateClassName
* @member Ext.Class
- * Defines alternate names for this class. For example:
- *
- * Ext.define('Developer', {
- * alternateClassName: ['Coder', 'Hacker'],
- * code: function(msg) {
- * alert('Typing... ' + msg);
- * }
- * });
- *
- * var joe = Ext.create('Developer');
- * joe.code('stackoverflow');
- *
- * var rms = Ext.create('Hacker');
- * rms.code('hack hack');
+ * {Ext_Class:config-alternateClassName:desc}
*/
Manager.registerPostprocessor('alternateClassName', function(name, cls, data) {
var alternates = data.alternateClassName,
@@ -1108,47 +1035,11 @@
// {{{ create
/**
- * Instantiate a class by either full name, alias or alternate name.
- *
- * If {@link Ext.Loader} is {@link Ext.Loader#setConfig enabled} and the class has
- * not been defined yet, it will attempt to load the class via synchronous loading.
+ * {Ext:method-create:desc}
*
- * For example, all these three lines return the same result:
- *
- * // alias
- * var window = Ext.create('widget.window', {
- * width: 600,
- * height: 800,
- * ...
- * });
- *
- * // alternate name
- * var window = Ext.create('Ext.Window', {
- * width: 600,
- * height: 800,
- * ...
- * });
- *
- * // full class name
- * var window = Ext.create('Ext.window.Window', {
- * width: 600,
- * height: 800,
- * ...
- * });
- *
- * // single object with xclass property:
- * var window = Ext.create({
- * xclass: 'Ext.window.Window', // any valid value for 'name' (above)
- * width: 600,
- * height: 800,
- * ...
- * });
- *
- * @param {String} [name] The class name or alias. Can be specified as `xclass`
- * property if only one object parameter is specified.
- * @param {Object...} [args] Additional arguments after the name will be passed to
- * the class' constructor.
- * @return {Object} instance
+ * @param {String} [name] {Ext:method-create:param_name}
+ * @param {Object...} [args] {Ext:method-create:param_args}
+ * @return {Object} {Ext:method-create:return}
* @member Ext
* @method create
*/
@@ -1158,7 +1049,7 @@
// {{{ createByAlias
/**
- * Convenient shorthand, see {@link Ext.ClassManager#instantiateByAlias}
+ * {Ext:method-createByAlias:desc}
* @member Ext
* @method createByAlias
*/
@@ -1172,24 +1063,9 @@
*
* {Ext:method-define:desc}
*
- * @param {String} className The class name to create in string dot-namespaced format, for example:
- * 'My.very.awesome.Class', 'FeedViewer.plugin.CoolPager'
- * It is highly recommended to follow this simple convention:
- * - The root and the class name are 'CamelCased'
- * - Everything else is lower-cased
- * @param {Object} data The key - value pairs of properties to apply to this class. Property names can be of any valid
- * strings, except those in the reserved listed below:
- * - `mixins`
- * - `statics`
- * - `config`
- * - `alias`
- * - `self`
- * - `singleton`
- * - `alternateClassName`
- * - `override`
- *
- * @param {Function} createdFn Optional callback to execute after the class is created, the execution scope of which
- * (`this`) will be the newly created class itself.
+ * @param {String} className {Ext:method-define:param_className}
+ * @param {Object} data {Ext:method-define:param_data}
+ * @param {Function} createdFn {Ext:method-define:param_createFn}
* @return {Ext.Base}
* @markdown
* @member Ext
@@ -1218,9 +1094,9 @@
// {{{ getDisplayName
/**
- * Returns the displayName property or className or object. When all else fails, returns "Anonymous".
- * @param {Object} object
- * @return {String}
+ * {Ext:method-getDisplayName:desc}
+ * @param {Object} object {Ext:mmethod-getDisplayName:param_object}
+ * @return {String} {Ext:mmethod-getDisplayName:return}
*/
getDisplayName: function(object) {
if(object) {
@@ -1244,7 +1120,7 @@
// {{{ getClass
/**
- * Convenient shorthand, see {@link Ext.ClassManager#getClass}
+ * {Ext:method-getClass:desc}
* @member Ext
* @method getClass
*/
@@ -1254,21 +1130,9 @@
// {{{ namespace
/**
- * Creates namespaces to be used for scoping variables and classes so that they are not global.
- * Specifying the last node of a namespace implicitly creates all other nodes. Usage:
- *
- * Ext.namespace('Company', 'Company.data');
- *
- * // equivalent and preferable to the above syntax
- * Ext.ns('Company.data');
- *
- * Company.Widget = function() { ... };
- *
- * Company.data.CustomStore = function(config) { ... };
- *
- * @param {String...} namespaces
- * @return {Object} The namespace object.
- * (If multiple arguments are passed, this will be the last namespace created)
+ * {Ext:method-namespace:desc}
+ * @param {String...} namespaces {Ext:nmethod-namespace:param_namespaces}
+ * @return {Object} {Ext:nmethod-namespace:return}
* @member Ext
* @method namespace
*/
@@ -1279,7 +1143,7 @@
});
/**
- * Convenient alias for {@link Ext#namespace Ext.namespace}.
+ * {Ext:method-ns:desc}
* @inheritdoc Ext#namespace
* @member Ext
* @method ns

0 comments on commit f9cfa3f

Please sign in to comment.
Something went wrong with that request. Please try again.