Skip to content

Commit 483edc4

Browse files
authored
Merge pull request #93 from wmde/formatters
Simplify ValueFormatter interface, remove ValueFormatterStore
2 parents 2758125 + b7a0c1a commit 483edc4

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

src/valueFormatters/formatters/ValueFormatter.js

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,24 @@
1010
* @author H. Snater < mediawiki@snater.com >
1111
*
1212
* @constructor
13-
*
14-
* @param {Object} options
1513
*/
16-
var SELF = vf.ValueFormatter = function VpValueFormatter( options ) {
17-
this._options = $.extend( {}, options || {} );
14+
var SELF = vf.ValueFormatter = function VpValueFormatter() {
1815
};
1916

2017
/**
2118
* @class valueFormatters.ValueFormatter
2219
*/
2320
$.extend( SELF.prototype, {
24-
/**
25-
* Formatter options.
26-
* @property {Object}
27-
* @private
28-
*/
29-
_options: null,
30-
31-
/**
32-
* Returns the formatter's options as set in the constructor.
33-
*
34-
* @return {Object}
35-
*/
36-
getOptions: function() {
37-
return $.extend( {}, this._options );
38-
},
3921

4022
/**
4123
* Formats a value. Will return a jQuery.Promise which will be resolved if formatting is
4224
* successful or rejected if it fails. There are various reasons why formatting could fail, e.g.
43-
* the formatter is using the API and the API cannot be reached. In case of success, the
25+
* the formatter is using an API and the API cannot be reached. In case of success, the
4426
* callbacks will be passed a dataValues.DataValue object. In case of failure, the callback's
4527
* parameter will be an error object of some sort (not implemented yet!).
4628
* @abstract
4729
*
4830
* @param {dataValues.DataValue} dataValue
49-
* @param {string} [dataTypeId]
50-
* @param {string} [outputType] The output's preferred MIME type
5131
* @return {Object} jQuery.Promise
5232
* @return {Function} return.done
5333
* @return {string|null} return.done.formatted Formatted DataValue.

0 commit comments

Comments
 (0)