1 | <?php |
||
24 | class AmoCRMClient |
||
25 | { |
||
26 | /** |
||
27 | * @var ClientInterface |
||
28 | */ |
||
29 | private $httpClient; |
||
30 | |||
31 | /** |
||
32 | * @var SessionStorageInterface |
||
33 | */ |
||
34 | private $sessionStorage; |
||
35 | |||
36 | /** |
||
37 | * @var LoggerInterface |
||
38 | */ |
||
39 | private $logger; |
||
40 | |||
41 | /** |
||
42 | * @var ResponseTransformerInterface |
||
43 | */ |
||
44 | private $responseTransformer; |
||
45 | |||
46 | /** |
||
47 | * AmoCRM constructor. |
||
48 | * |
||
49 | * @param ClientInterface $httpClient |
||
50 | * @param SessionStorageInterface $sessionStorage |
||
51 | * @param ResponseTransformerInterface $responseTransformer |
||
52 | * @param LoggerInterface $logger |
||
53 | */ |
||
54 | 4 | public function __construct( |
|
65 | |||
66 | /** |
||
67 | * @param ClientInterface $httpClient |
||
68 | */ |
||
69 | public function setHttpClient($httpClient) |
||
73 | |||
74 | /** |
||
75 | * @param SessionStorageInterface $sessionStorage |
||
76 | */ |
||
77 | public function setSessionStorage($sessionStorage) |
||
81 | |||
82 | /** |
||
83 | * @param ResponseTransformerInterface $responseTransformer |
||
84 | */ |
||
85 | public function setResponseTransformer($responseTransformer) |
||
89 | |||
90 | /** |
||
91 | * @param LoggerInterface $logger |
||
92 | */ |
||
93 | public function setLogger($logger) |
||
97 | |||
98 | /** |
||
99 | * @param MethodInterface $method |
||
100 | * @return mixed |
||
101 | * @throws AmoCRMException |
||
102 | */ |
||
103 | 4 | public function exec(MethodInterface $method) |
|
138 | |||
139 | /** |
||
140 | * @param UserInterface $user |
||
141 | * @throws AmoCRMException |
||
142 | */ |
||
143 | 2 | private function auth(UserInterface $user) |
|
166 | } |
||
167 |