Ext.data.JsonP.Ext_ClassManager({"mixins":[],"code_type":"nop","inheritable":false,"component":false,"meta":{"author":["Jacky Nguyen "],"docauthor":["Jacky Nguyen "]},"mixedInto":[],"uses":[],"aliases":{},"parentMixins":[],"superclasses":[],"members":{"event":[],"property":[{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"classes","id":"property-classes"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"createdListeners","id":"property-createdListeners"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"defaultPostprocessors","id":"property-defaultPostprocessors"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"enableNamespaceParseCache","id":"property-enableNamespaceParseCache"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"existCache","id":"property-existCache"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"instantiators","id":"property-instantiators"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"maps","id":"property-maps"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"nameCreatedListeners","id":"property-nameCreatedListeners"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"namespaceParseCache","id":"property-namespaceParseCache"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"namespaceRewrites","id":"property-namespaceRewrites"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"property","name":"postprocessors","id":"property-postprocessors"}],"css_var":[],"method":[{"meta":{"deprecated":{"text":"Use {@link Ext#define} instead, as that also supports creating overrides.","version":"4.1.0"}},"owner":"Ext.ClassManager","tagname":"method","name":"create","id":"method-create"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"method","name":"createNamespaces","id":"method-createNamespaces"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"method","name":"dynInstantiate","id":"method-dynInstantiate"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"get","id":"method-get"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"getAliasesByName","id":"method-getAliasesByName"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"getByAlias","id":"method-getByAlias"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"getClass","id":"method-getClass"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"getDisplayName","id":"method-getDisplayName"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"method","name":"getInstantiator","id":"method-getInstantiator"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"getName","id":"method-getName"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"getNameByAlias","id":"method-getNameByAlias"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"getNameByAlternate","id":"method-getNameByAlternate"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"getNamesByExpression","id":"method-getNamesByExpression"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"method","name":"instantiate","id":"method-instantiate"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"instantiateByAlias","id":"method-instantiateByAlias"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"isCreated","id":"method-isCreated"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"method","name":"onCreated","id":"method-onCreated"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"method","name":"parseNamespace","id":"method-parseNamespace"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"method","name":"registerPostprocessor","id":"method-registerPostprocessor"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"set","id":"method-set"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"setAlias","id":"method-setAlias"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"method","name":"setDefaultPostprocessorPosition","id":"method-setDefaultPostprocessorPosition"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"method","name":"setDefaultPostprocessors","id":"method-setDefaultPostprocessors"},{"meta":{},"owner":"Ext.ClassManager","tagname":"method","name":"setNamespace","id":"method-setNamespace"},{"meta":{"private":true},"owner":"Ext.ClassManager","tagname":"method","name":"triggerCreated","id":"method-triggerCreated"}],"css_mixin":[],"cfg":[]},"tagname":"class","extends":null,"html":"

Files

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:

\n\n\n\n\n

Basic syntax:

\n\n
Ext.define(className, properties);\n
\n\n

in which properties is an object represent a collection of properties that apply to the class. See\ncreate for more detailed instructions.

\n\n
Ext.define('Person', {\n     name: 'Unknown',\n\n     constructor: function(name) {\n         if (name) {\n             this.name = name;\n         }\n     },\n\n     eat: function(foodType) {\n         alert(\"I'm eating: \" + foodType);\n\n         return this;\n     }\n});\n\nvar aaron = new Person(\"Aaron\");\naaron.eat(\"Sandwich\"); // alert(\"I'm eating: Sandwich\");\n
\n\n

Ext.Class has a powerful set of extensible pre-processors which takes care of\neverything related to class creation, including but not limited to inheritance, mixins, configuration, statics, etc.

\n\n

Inheritance:

\n\n
Ext.define('Developer', {\n     extend: 'Person',\n\n     constructor: function(name, isGeek) {\n         this.isGeek = isGeek;\n\n         // Apply a method from the parent class' prototype\n         this.callParent([name]);\n     },\n\n     code: function(language) {\n         alert(\"I'm coding in: \" + language);\n\n         this.eat(\"Bugs\");\n\n         return this;\n     }\n});\n\nvar jacky = new Developer(\"Jacky\", true);\njacky.code(\"JavaScript\"); // alert(\"I'm coding in: JavaScript\");\n                          // alert(\"I'm eating: Bugs\");\n
\n\n

See Ext.Base.callParent for more details on calling superclass' methods

\n\n

Mixins:

\n\n
Ext.define('CanPlayGuitar', {\n     playGuitar: function() {\n        alert(\"F#...G...D...A\");\n     }\n});\n\nExt.define('CanComposeSongs', {\n     composeSongs: function() { ... }\n});\n\nExt.define('CanSing', {\n     sing: function() {\n         alert(\"I'm on the highway to hell...\")\n     }\n});\n\nExt.define('Musician', {\n     extend: 'Person',\n\n     mixins: {\n         canPlayGuitar: 'CanPlayGuitar',\n         canComposeSongs: 'CanComposeSongs',\n         canSing: 'CanSing'\n     }\n})\n\nExt.define('CoolPerson', {\n     extend: 'Person',\n\n     mixins: {\n         canPlayGuitar: 'CanPlayGuitar',\n         canSing: 'CanSing'\n     },\n\n     sing: function() {\n         alert(\"Ahem....\");\n\n         this.mixins.canSing.sing.call(this);\n\n         alert(\"[Playing guitar at the same time...]\");\n\n         this.playGuitar();\n     }\n});\n\nvar me = new CoolPerson(\"Jacky\");\n\nme.sing(); // alert(\"Ahem...\");\n           // alert(\"I'm on the highway to hell...\");\n           // alert(\"[Playing guitar at the same time...]\");\n           // alert(\"F#...G...D...A\");\n
\n\n

Config:

\n\n
Ext.define('SmartPhone', {\n     config: {\n         hasTouchScreen: false,\n         operatingSystem: 'Other',\n         price: 500\n     },\n\n     isExpensive: false,\n\n     constructor: function(config) {\n         this.initConfig(config);\n     },\n\n     applyPrice: function(price) {\n         this.isExpensive = (price > 500);\n\n         return price;\n     },\n\n     applyOperatingSystem: function(operatingSystem) {\n         if (!(/^(iOS|Android|BlackBerry)$/i).test(operatingSystem)) {\n             return 'Other';\n         }\n\n         return operatingSystem;\n     }\n});\n\nvar iPhone = new SmartPhone({\n     hasTouchScreen: true,\n     operatingSystem: 'iOS'\n});\n\niPhone.getPrice(); // 500;\niPhone.getOperatingSystem(); // 'iOS'\niPhone.getHasTouchScreen(); // true;\niPhone.hasTouchScreen(); // true\n\niPhone.isExpensive; // false;\niPhone.setPrice(600);\niPhone.getPrice(); // 600\niPhone.isExpensive; // true;\n\niPhone.setOperatingSystem('AlienOS');\niPhone.getOperatingSystem(); // 'Other'\n
\n\n

Statics:

\n\n
Ext.define('Computer', {\n     statics: {\n         factory: function(brand) {\n            // 'this' in static methods refer to the class itself\n             return new this(brand);\n         }\n     },\n\n     constructor: function() { ... }\n});\n\nvar dellComputer = Computer.factory('Dell');\n
\n\n

Also see Ext.Base.statics and Ext.Base.self for more details on accessing\nstatic properties within class methods

\n
Defined By

Properties

Ext.ClassManager
view source
: Objectprivate
All classes which were defined through the ClassManager. ...

All classes which were defined through the ClassManager. Keys are the\nname of the classes and the values are references to the classes.

\n

Defaults to: {}

Ext.ClassManager
view source
: Arrayprivate
...
\n

Defaults to: []

Ext.ClassManager
view source
: Arrayprivate
...
\n

Defaults to: []

...
\n

Defaults to: true

Ext.ClassManager
view source
: Objectprivate
...
\n

Defaults to: {}

Ext.ClassManager
view source
: Arrayprivate
...
\n

Defaults to: []

Ext.ClassManager
view source
: Objectprivate
...
\n

Defaults to: {alternateToName: {}, aliasToName: {}, nameToAliases: {}, nameToAlternates: {}}

Ext.ClassManager
view source
: Objectprivate
...
\n

Defaults to: {}

Ext.ClassManager
view source
: Objectprivate
...
\n

Defaults to: {}

Ext.ClassManager
view source
namespaceRewrites : Objectprivate
\n
\n
Ext.ClassManager
view source
: Objectprivate
...
\n

Defaults to: {}

Defined By

Methods

Ext.ClassManager
view source
( Object className, Object data, Object createdFn )deprecated
Defines a class. ...

Defines a class.

\n
\n

This method has been deprecated since 4.1.0

\n

Use Ext.define instead, as that also supports creating overrides.

\n\n
\n

Parameters

Ext.ClassManager
view source
( )private
The new Ext.ns, supports namespace rewriting ...

The new Ext.ns, supports namespace rewriting

\n
Ext.ClassManager
view source
( Object name, Object args )private
...
\n

Parameters

Ext.ClassManager
view source
( String name ) : Ext.Class
Retrieve a class by its name. ...

Retrieve a class by its name.

\n

Parameters

Returns

Ext.ClassManager
view source
( String name ) : Array
Get the aliases of a class by the class name ...

Get the aliases of a class by the class name

\n

Parameters

Returns

Ext.ClassManager
view source
( String alias ) : Ext.Class
Get a reference to the class by its alias. ...

Get a reference to the class by its alias.

\n

Parameters

Returns

Ext.ClassManager
view source
( Object object ) : Ext.Class
Get the class of the provided object; returns null if it's not an instance\nof any class created with Ext.define. ...

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 Ext.getClass

\n\n
var component = new Ext.Component();\n\nExt.ClassManager.getClass(component); // returns Ext.Component\n
\n

Parameters

Returns

Ext.ClassManager
view source
( Object object ) : String
Returns the displayName property or className or object. ...

Returns the displayName property or className or object. When all else fails, returns \"Anonymous\".

\n

Parameters

Returns

Ext.ClassManager
view source
( Object length )private
...
\n

Parameters

Ext.ClassManager
view source
( Ext.Class/Object object ) : String
Get the name of the class by its reference or its instance;\nusually invoked by the shorthand Ext.getClassName\n\nExt.Cl...

Get the name of the class by its reference or its instance;\nusually invoked by the shorthand Ext.getClassName

\n\n
Ext.ClassManager.getName(Ext.Action); // returns \"Ext.Action\"\n
\n

Parameters

Returns

Ext.ClassManager
view source
( String alias ) : String
Get the name of a class by its alias. ...

Get the name of a class by its alias.

\n

Parameters

Returns

Ext.ClassManager
view source
( String alternate ) : String
Get the name of a class by its alternate name. ...

Get the name of a class by its alternate name.

\n

Parameters

Returns

Ext.ClassManager
view source
( String expression ) : String[]
Converts a string expression to an array of matching class names. ...

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:

\n\n
 // 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
\n

Parameters

Returns

Ext.ClassManager
view source
( )private
...
\n
Ext.ClassManager
view source
( String alias, Object... args ) : Object
Instantiate a class by its alias; usually invoked by the convenient shorthand Ext.createByAlias\nIf Ext.Loader is enab...

Instantiate a class by its alias; usually invoked by the convenient shorthand Ext.createByAlias\nIf Ext.Loader is enabled and the class has not been defined yet, it will\nattempt to load the class via synchronous loading.

\n\n
var window = Ext.ClassManager.instantiateByAlias('widget.window', { width: 600, height: 800, ... });\n
\n

Parameters

  • alias : String
    \n
  • args : Object...

    Additional arguments after the alias will be passed to the\nclass constructor.

    \n

Returns

Ext.ClassManager
view source
( String className ) : Boolean
Checks if a class has already been created. ...

Checks if a class has already been created.

\n

Parameters

Returns

Ext.ClassManager
view source
( Object fn, Object scope, Object className )private
...
\n

Parameters

Ext.ClassManager
view source
( Object namespace )private
Supports namespace rewriting ...

Supports namespace rewriting

\n

Parameters

Ext.ClassManager
view source
( String name, Function postprocessor )private
Register a post-processor function. ...

Register a post-processor function.

\n

Parameters

Ext.ClassManager
view source
( String name, Object value ) : Ext.ClassManager
Sets a name reference to a class. ...

Sets a name reference to a class.

\n

Parameters

Returns

Ext.ClassManager
view source
( Ext.Class/String cls, String alias )
Register the alias for a class. ...

Register the alias for a class.

\n

Parameters

  • cls : Ext.Class/String

    a reference to a class or a className

    \n
  • alias : String

    Alias to use when referring to this class

    \n
Ext.ClassManager
view source
( String name, String offset, String relativeName ) : Ext.ClassManagerprivate
Insert this post-processor at a specific position in the stack, optionally relative to\nany existing post-processor ...

Insert this post-processor at a specific position in the stack, optionally relative to\nany existing post-processor

\n

Parameters

  • name : String

    The post-processor name. Note that it needs to be registered with\nregisterPostprocessor before this

    \n
  • offset : String

    The insertion position. Four possible values are:\n'first', 'last', or: 'before', 'after' (relative to the name provided in the third argument)

    \n
  • relativeName : String
    \n

Returns

Set the default post processors array stack which are applied to every class. ...

Set the default post processors array stack which are applied to every class.

\n

Parameters

  • The : String/Array

    name of a registered post processor or an array of registered names.

    \n

Returns

Ext.ClassManager
view source
( String name, Object value )
Creates a namespace and assign the value to the created object\n\nExt.ClassManager.setNamespace('MyCompany.pkg.Example'...

Creates a namespace and assign the value to the created object

\n\n
Ext.ClassManager.setNamespace('MyCompany.pkg.Example', someObject);\n\nalert(MyCompany.pkg.Example === someObject); // alerts true\n
\n

Parameters

Ext.ClassManager
view source
( Object className )private
...
\n

Parameters

","subclasses":[],"name":"Ext.ClassManager","alternateClassNames":[],"inheritdoc":null,"files":[{"href":"ClassManager.html#Ext-ClassManager","filename":"ClassManager.js"}],"html_meta":{"author":null,"docauthor":null},"singleton":true,"id":"class-Ext.ClassManager","statics":{"property":[],"event":[],"css_var":[],"method":[],"css_mixin":[],"cfg":[]},"requires":[]});