public function getFromWebserviceImport($wsElement, $document = null, $params = [], $idMapper = null) { $data = $wsElement->value; if ($data->data === null or is_array($data->data)) { $this->data = $data->data; } else { throw new \Exception("cannot get values from web service import - invalid data"); } }