diff --git a/src/Api/Operator.php b/src/Api/Operator.php index bab9b2b3..7eecdf0e 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -96,7 +96,11 @@ protected function _getItems($structClass, $infoTag, $field = null, $value = nul if (!isset($xmlResult->data) || !isset($xmlResult->data->$infoTag)) { continue; } - $items[] = new $structClass($xmlResult->data->$infoTag); + if (isset($xmlResult->id)) { + $items[(int) $xmlResult->id] = new $structClass($xmlResult->data->$infoTag); + } else { + $items[] = new $structClass($xmlResult->data->$infoTag); + } } return $items;