You are here

function SampleProcessor::parse in Web Service Data 7

Parser function

Each instance of WsData must include an implementation of parse. This is the function which takes in data from the web service and converts it into data which Drupal can understand and use in fields.

The parsed data must be converted into an array which follows the same data hierarchy as your source data to work with the default getData() method.

For example, this function may accept an XML string and return an array of data representing that string.

Parameters

$data: Data to be parsed

Return value

array|boolean Return the parsed data, FALSE otherwise.

Overrides WsData::parse

File

modules/wsconfig/wsconfig.api.php, line 112
Describe the file

Class

SampleProcessor
Sample implementation of WsData

Code

function parse($data) {

  // Do something
}