Documentation

Plugins/Claypool/config

From jQuery JavaScript Library

Jump to: navigation, search

« Back to Plugins/Claypool

config[id][obj] )

Retrieves or extends the entire configuration, or a subset of the configuration.
This method is entry point into jquery.claypool. All of claypools submodules, like logging, mvc, ioc, and aop will be accessed directly through $.config. Claypool also provides a simple strategy to allow you to switch conveniently between various development environments using $.config
Arguments:
id (Optional)String
The id of the configuration subset. If the argument is present, it should be a dot-delimited string, it will be resolved, and return that subset of the configuration.
obj (Optional)Object
The object that will be saved in application scope with the given id.


Examples:
If no arg is present the entire application object is returned.

$.config();

If a single arg is present the string is configuration subset is returned.

$.config("mvc");

The configuration subset identified by the first arg is deeply extended or merged if the second arg is a object or array (respectively). Chainable.

$.config("abc", /*object or array*/);

NameType