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