From fbd776a075e19e3281fc4a2c5af0b120eef9d555 Mon Sep 17 00:00:00 2001 From: Vitaly Artemev Date: Tue, 6 Dec 2016 14:43:49 +0400 Subject: [PATCH] Delete RetailcrmProxy.php --- .../classes/retailcrm/RetailcrmProxy.php | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 classes/modules/RetailCRM/classes/retailcrm/RetailcrmProxy.php diff --git a/classes/modules/RetailCRM/classes/retailcrm/RetailcrmProxy.php b/classes/modules/RetailCRM/classes/retailcrm/RetailcrmProxy.php deleted file mode 100644 index e866baf..0000000 --- a/classes/modules/RetailCRM/classes/retailcrm/RetailcrmProxy.php +++ /dev/null @@ -1,39 +0,0 @@ -api = new RetailcrmApiClient($url, $key); - $this->log = $log; - } - public function __call($method, $arguments) - { - $accessLog = date('H:m:i') . ' [' . $method . '] -> ' . json_encode($arguments) . "\n"; - error_log($accessLog, 3, $this->log); - - try { - $response = call_user_func_array(array($this->api, $method), $arguments); - if (!$response->isSuccessful()) { - error_log("[$method] " . $response->getErrorMsg() . "\n", 3, $this->log); - if (isset($response['errors'])) { - $error = implode("\n", $response['errors']); - error_log($error . "\n", 3, $this->log); - } - $response = false; - } - return $response; - } catch (CurlException $e) { - error_log("[$method] " . $e->getMessage() . "\n", 3, $this->log); - return false; - } catch (InvalidJsonException $e) { - error_log("[$method] " . $e->getMessage() . "\n", 3, $this->log); - return false; - } - } -} \ No newline at end of file