uawdijnntqw1x1x1
IP : 216.73.216.30
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
.
/
files
/
need-2-delete
/
mini-borishof.ru1
/
bitrix
/
modules
/
seo
/
.
/
lib
/
retargeting
/
request.php
/
/
<? namespace Bitrix\Seo\Retargeting; use \Bitrix\Main\Error; use \Bitrix\Seo\Retargeting\Internals\ServiceLogTable; abstract class Request { const TYPE_CODE = ''; /** @var AuthAdapter */ protected $adapter; /** @var AdsHttpClient */ protected $client; protected $response; protected $type; protected $endpoint; public function __construct() { $this->type = static::TYPE_CODE; $this->adapter = AuthAdapter::create(static::TYPE_CODE); $options = array( 'socketTimeout' => 5 ); $this->client = new AdsHttpClient($options); } /** * @return AuthAdapter */ public function getAuthAdapter() { return $this->adapter; } public function setAuthAdapter(AuthAdapter $adapter) { $this->adapter = $adapter; return $this; } public function getResponse() { return $this->response; } public function getClient() { return $this->client; } public function setClient(AdsHttpClient $client) { $this->client = $client; return $this; } public function getEndpoint() { return $this->endpoint; } /** * @param $type * @return static */ public static function create($type) { return Factory::create(get_called_class(), $type); } /** * @param array $params * @return Response */ public function send(array $params = array()) { if (!$this->adapter) { $this->adapter = AuthAdapter::create($this->type); } if (!$this->client) { $options = array( 'socketTimeout' => 5 ); $this->client = new AdsHttpClient($options); } $data = $this->query($params); $response = Response::create($this->type); $response->setRequest($this); $response->setResponseText($data); try { $response->parse($data); } catch (\Exception $exception) { $response->addError(new Error($exception->getMessage(), $exception->getCode())); } if ($response->getErrorCollection()->count() > 0) { $errors = $response->getErrors(); foreach ($errors as $error) { if (!$error->getMessage()) { continue; } ServiceLogTable::add(array( 'GROUP_ID' => 'retargeting', 'TYPE' => static::TYPE_CODE, 'CODE' => $error->getCode(), 'MESSAGE' => $error->getMessage() )); } } return $response; } abstract public function query(array $params = array()); }
/var/./files/need-2-delete/mini-borishof.ru1/bitrix/modules/seo/./lib/retargeting/request.php