12Loc::loadMessages(__FILE__);
21 private $accessToken = NULL;
22 public static $apiUrl =
'https://api.vk.com/method/';
37 $this->exportId = $exportId;
38 $this->response =
array();
42 $this->accessToken = $accessToken;
59 $params[
'access_token'] = $this->accessToken;
60 $params[
'v'] = self::$apiVersion;
66 if (!is_string($responseStr))
71 $this->response = Json::decode($responseStr);
74 return $this->response[
'response'];
88 if ($this->checkRequestsLimit())
93 if (isset($this->response[
"error"]))
97 'Catch error in method ' .
$method,
98 array(
'ERROR' => $this->response[
"error"] .
' - ' . $this->response[
"error_msg"],
"PARAMS" =>
$params)
100 $logger->addError($this->response[
"error"][
"error_code"],
$method);
102 throw new Vk\ExecuteException(
"VK_critical_execution_error " . $this->response[
"error"][
"error_code"] .
" in method " .
$method);
106 if (isset($this->response[
"execute_errors"]))
108 $logger =
new Vk\Logger($this->exportId);
109 foreach ($this->response[
"execute_errors"] as $er)
112 'Execute error in method ' .
$method,
113 array(
'ERROR' => $er[
"error_code"] .
' (' . $er[
"method"] .
') - ' . $er[
"error_msg"],
"PARAMS" =>
$params,
114 "RESPONSE" => $this->response)
116 $logger->addError($er[
"error_code"]);
124 private function checkRequestsLimit()
127 if (isset($this->response[
"error"]) && $this->response[
"error"][
"error_code"] == self::TOO_MANY_REQUESTS_ERROR_CODE)
130 $this->response =
array();
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']