Sha256: 2b862d550378f15e51d6d7af3f85c14a067520dadc3b72a776980efca15ce68e
Contents?: true
Size: 839 Bytes
Versions: 7
Compression:
Stored size: 839 Bytes
Contents
/** * Manages registration and retrieval of MVC Model adapters * @class ExtMVC.model.AdapterManager */ ExtMVC.model.AdapterManager = { /** * @property adapters * @type Object * Key/Value pairs of registered names and the relevant Adapter objects */ adapters: {}, /** * Registers an adapter for use with MVC Models. * @param {String} name String name for this Adapter (e.g. 'REST') * @param {Function} object A reference to the Adapter object itself */ register: function(name, constructor) { this.adapters[name] = constructor; }, /** * Retrieves the requested adapter by key name * @param {String} name The name of the adapter to fine (e.g. 'REST') * @return {Object/Null} The Adapter object, if found */ find: function(name, config) { return this.adapters[name]; } };
Version data entries
7 entries across 6 versions & 1 rubygems