public function getFromWebserviceImport($value, $object = null, $params = [], $idMapper = null)
{
if (empty($value)) {
return null;
} else {
if ($value instanceof \stdClass) {
$value = (array) $value;
}
if (is_array($value)) {
$dataArray = [];
foreach ($this->getRows() as $r) {
foreach ($this->getCols() as $c) {
$name = $r['key'] . "#" . $c['key'];
$dataArray[$r['key']][$c['key']] = $value[$name];
}
}
return new Object\Data\StructuredTable($dataArray);
} else {
throw new \Exception("cannot get values from web service import - invalid data");
}
}
}