datasource-dataparser-debug.js revision c191fe0fba4e4e33644dcda4ab215d50f5d0fcd2
/**
* Extends DataSource.Base with schema-based parsing functionality.
*
* @module datasource-dataparser
* @requires datasource-base,dataparser-base
* @title DataSource DataParser Extension
*/
/**
* Adds parsability to the YUI DataSource utility.
* @class Parsable
*/
Parsable = function() {};
/////////////////////////////////////////////////////////////////////////////
//
// DataSource.Base Attributes
//
/////////////////////////////////////////////////////////////////////////////
/**
* Instance of DataParser.
*
* @attribute parser
* @type Y.DataParser.Base
* @default null
*/
parser: {
value: null,
}
}
};
/**
* Overriding <code>data</code> event handler parses raw data into a normalized response.
*
* @method _handleData
* @param e {Event.Facade} Event Facade.
* @param o {Object} Object with the following properties:
* <dl>
* <dt>tId (Number)</dt> <dd>Unique transaction ID.</dd>
* <dt>request (Object)</dt> <dd>The request.</dd>
* <dt>callback (Object)</dt> <dd>The callback object.</dd>
* <dt>data (Object)</dt> <dd>The raw response.</dd>
* </dl>
* @protected
*/
_handleData: function(e, o) {
if(!response) {
response = {
meta: {},
};
}
}
};
dynamic: false
});