dataschema-array.js revision c1641e80c2d0d5db16cd79f19b76ad8fc1fb4921
/**
* Provides a DataSchema implementation which can be used to work with data stored in arrays.
*
* @module dataschema
* @submodule dataschema-array
*/
/**
* Array subclass for the DataSchema Utility.
* @class DataSchema.Array
* @extends DataSchema.Base
* @static
*/
SchemaArray = {
/////////////////////////////////////////////////////////////////////////////
//
// DataSchema.Array static methods
//
/////////////////////////////////////////////////////////////////////////////
/**
* Applies a given schema to given Array data.
*
* @method apply
* @param schema {Object} Schema to apply.
* @param data {Object} Array data.
* @return {Object} Schema-parsed data.
* @static
*/
// Parse results data
}
else {
}
}
else {
}
return data_out;
},
/**
* Schema-parsed list of results from full data
*
* @method _parseResults
* @param fields {Array} Schema to parse against.
* @param array_in {Array} Array to parse.
* @param data_out {Object} In-progress parsed data to update.
* @return {Object} Parsed data object.
* @static
* @protected
*/
var results = [],
result = {};
type = (LANG.isObject(item) && !LANG.isFunction(item)) ? 2 : (LANG.isArray(item)) ? 1 : (LANG.isString(item)) ? 0 : -1;
if(type > 0) {
}
}
else if(type === 0) {
}
else {
//TODO: null or {}?
result = null;
}
}
return data_out;
}
};