Class Loader

Index

Properties

Methods

Properties

public static disableCaching: boolean

[Config Option] (Boolean)

public static disableCachingParam: string

[Config Option] (String)

public static enabled: boolean

[Config Option] (Boolean)

public static history: Array<any>

[Property] (Array)

public static paths: any

[Config Option] (Object)

Methods

public static addClassPathMappings(paths?: Object): ILoader

[Method] Sets a batch of path entries

Parameters

  • paths?: Object optional

    Object a set of className: path mappings

Returns

ILoader

Ext.Loader this

public static exclude(excludes?: Array<any>): any

[Method] Explicitly exclude files from being loaded

Parameters

  • excludes?: Array<any> optional

    Array

Returns

any

Object object contains require method for chaining.

public static getConfig(name?: string): any

[Method] Get the config value corresponding to the specified name

Parameters

  • name?: string optional

    String The config property name.

Returns

any

Object/Mixed

public static getPath(className?: string): string

[Method] Translates a className to a file path by adding the the proper prefix and converting the s to s

Parameters

  • className?: string optional

    String

Returns

string

String path

public static onReady(fn?: any, scope?: any, withDomReady?: boolean)

[Method] Add a new listener to be executed when all required scripts are fully loaded

Parameters

  • fn?: any optional

    Function The function callback to be executed.

  • scope?: any optional

    Object The execution scope (this) of the callback function.

  • withDomReady?: boolean optional

    Boolean Whether or not to wait for document DOM ready as well.

public static require(expressions?: any, fn?: any, scope?: any, excludes?: any)

[Method] Loads all classes by the given names and all their direct dependencies optionally executes the given callback functi

Parameters

  • expressions?: any optional

    String/Array Can either be a string or an array of string.

  • fn?: any optional

    Function The callback function.

  • scope?: any optional

    Object The execution scope (this) of the callback function.

  • excludes?: any optional

    String/Array Classes to be excluded, useful when being used with expressions.

public static setConfig(name?: any, value?: any): ILoader

[Method] Set the configuration for the loader

Parameters

  • name?: any optional

    Object/String The config object to override the default values or name of a single config setting when also passing the second parameter.

  • value?: any optional

    Mixed The value for the config setting.

Returns

ILoader

Ext.Loader this

public static setPath(name?: any, path?: string): ILoader

[Method] Sets the path of a namespace

Parameters

  • name?: any optional

    String/Object See flexSetter

  • path?: string optional

    String See flexSetter

Returns

ILoader

Ext.Loader this

public static syncRequire(expressions?: any, fn?: any, scope?: any, excludes?: any)

[Method] Synchronously loads all classes by the given names and all their direct dependencies optionally executes the given c

Parameters

  • expressions?: any optional

    String/Array Can either be a string or an array of string

  • fn?: any optional

    Function The callback function

  • scope?: any optional

    Object The execution scope (this) of the callback function

  • excludes?: any optional

    String/Array Classes to be excluded, useful when being used with expressions