File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/seo/lib/retargeting/proxyrequest.php
Back
<? namespace Bitrix\Seo\Retargeting; use Bitrix\Main\InvalidOperationException; use Bitrix\Seo\Engine; class ProxyRequest extends Request { const REST_METHOD_PREFIX = ''; /** * Request through cloud-adv service * * @param array $params Request params. * @return array|bool * @throws \Bitrix\Main\SystemException */ public function query(array $params = array()) { if ($this->useDirectQuery) { return $this->directQuery($params); } $methodName = static::REST_METHOD_PREFIX . '.' . $params['methodName']; $parameters = $params['parameters']; $engine = new Engine\Bitrix(); if (!$engine->isRegistered()) { return false; } $parameters['proxy_client_id'] = $this->getAuthAdapter()->getClientId(); $parameters['lang'] = LANGUAGE_ID; $transport = $engine->getInterface()->getTransport(); if ($params['timeout']) { $transport->setTimeout($params['timeout']); } $response = $transport->call($methodName, $parameters); if ($response['result']['RESULT']) { return $response['result']['RESULT']; } if ($response['error']) { throw new InvalidOperationException($response['error_description'] ? $response['error_description'] : $response['error']); } return []; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings