/** * {@inheritdoc} */ public function call($action, $params = []) { if (null !== $this->sessionId) { $params = array_merge(['sessionId' => $this->sessionId], (array) $params); } if ($this->logger) { $this->logger->debug(sprintf('[%.1fMB/%.1fMB] Call %s action with %s parameters', memory_get_usage() / 1024 / 1024, memory_get_peak_usage() / 1024 / 1024, $action, json_encode($params))); } if ($this->isWsiMode) { $result = parent::call($action, [(object) $params]); $result = WSIUtils::parseWSIResponse($result); } else { $result = parent::call($action, $params); } $this->lookUpForServerTime(); return $result; }
/** * {@inheritdoc} */ public function call($action, $params = []) { if (null !== $this->sessionId) { $params = array_merge(['sessionId' => $this->sessionId], (array) $params); } if ($this->isWsiMode) { $result = parent::call($action, [(object) $params]); $result = WSIUtils::parseWSIResponse($result); } else { $result = parent::call($action, $params); } $this->lookUpForServerTime(); return $result; }