|
|
@ -8,8 +8,6 @@ class Client |
|
|
|
{ |
|
|
|
{ |
|
|
|
private Curl $_curl; |
|
|
|
private Curl $_curl; |
|
|
|
|
|
|
|
|
|
|
|
private int $_id = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private string $_url; |
|
|
|
private string $_url; |
|
|
|
|
|
|
|
|
|
|
|
public function __construct( |
|
|
|
public function __construct( |
|
|
@ -55,8 +53,6 @@ class Client |
|
|
|
|
|
|
|
|
|
|
|
private function _exec(string $uri, string $method = 'POST', array $data = [], array &$errors = []): ?array |
|
|
|
private function _exec(string $uri, string $method = 'POST', array $data = [], array &$errors = []): ?array |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->_id = time(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
curl_setopt( |
|
|
|
curl_setopt( |
|
|
|
$this->_curl, |
|
|
|
$this->_curl, |
|
|
|
CURLOPT_URL, |
|
|
|
CURLOPT_URL, |
|
|
@ -90,7 +86,7 @@ class Client |
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
$errors[$this->_id][] = curl_error( |
|
|
|
$errors[] = curl_error( |
|
|
|
$this->_curl |
|
|
|
$this->_curl |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
@ -111,7 +107,7 @@ class Client |
|
|
|
$userPrivateKey, |
|
|
|
$userPrivateKey, |
|
|
|
$userName |
|
|
|
$userName |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -129,7 +125,7 @@ class Client |
|
|
|
[ |
|
|
|
[ |
|
|
|
$number |
|
|
|
$number |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -147,7 +143,7 @@ class Client |
|
|
|
[ |
|
|
|
[ |
|
|
|
$hash |
|
|
|
$hash |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -166,7 +162,7 @@ class Client |
|
|
|
$limit, |
|
|
|
$limit, |
|
|
|
$data |
|
|
|
$data |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -185,7 +181,7 @@ class Client |
|
|
|
$userName, |
|
|
|
$userName, |
|
|
|
$userNames |
|
|
|
$userNames |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -204,7 +200,7 @@ class Client |
|
|
|
$userName, |
|
|
|
$userName, |
|
|
|
$userNames |
|
|
|
$userNames |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -222,7 +218,7 @@ class Client |
|
|
|
[ |
|
|
|
[ |
|
|
|
$userName |
|
|
|
$userName |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -242,7 +238,7 @@ class Client |
|
|
|
'profile', |
|
|
|
'profile', |
|
|
|
's' |
|
|
|
's' |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -262,7 +258,7 @@ class Client |
|
|
|
'avatar', |
|
|
|
'avatar', |
|
|
|
's' |
|
|
|
's' |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -284,7 +280,7 @@ class Client |
|
|
|
$sig_user, |
|
|
|
$sig_user, |
|
|
|
$seq, |
|
|
|
$seq, |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -302,7 +298,7 @@ class Client |
|
|
|
[ |
|
|
|
[ |
|
|
|
$userName |
|
|
|
$userName |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -320,7 +316,7 @@ class Client |
|
|
|
[ |
|
|
|
[ |
|
|
|
$userName |
|
|
|
$userName |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -340,7 +336,7 @@ class Client |
|
|
|
$k, |
|
|
|
$k, |
|
|
|
$message |
|
|
|
$message |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
@ -364,7 +360,7 @@ class Client |
|
|
|
], |
|
|
|
], |
|
|
|
$comment |
|
|
|
$comment |
|
|
|
], |
|
|
|
], |
|
|
|
'id' => $this->_id |
|
|
|
'id' => time() |
|
|
|
], |
|
|
|
], |
|
|
|
$errors |
|
|
|
$errors |
|
|
|
); |
|
|
|
); |
|
|
|