1 | <?php |
||
24 | final class InstapushClient |
||
25 | { |
||
26 | /** @var \Http\Client\HttpClient */ |
||
27 | private $httpClient; |
||
28 | |||
29 | /** @var \Http\Message\RequestFactory */ |
||
30 | private $requestFactory; |
||
31 | |||
32 | /** @var \Fnayou\InstapushPHP\Transformer\TransformerInterface */ |
||
33 | private $transformer; |
||
34 | |||
35 | /** @var bool */ |
||
36 | private $exception = true; |
||
37 | |||
38 | /** |
||
39 | * @param \Http\Client\HttpClient $httpClient |
||
40 | * @param \Http\Message\RequestFactory $requestFactory |
||
41 | * @param \Fnayou\InstapushPHP\Transformer\TransformerInterface $transformer |
||
42 | */ |
||
43 | public function __construct( |
||
52 | |||
53 | /** |
||
54 | * @param \Fnayou\InstapushPHP\Http\HttpClientConfiguratorInterface $httpClientConfigurator |
||
55 | * @param \Http\Message\RequestFactory $requestFactory |
||
56 | * @param \Fnayou\InstapushPHP\Transformer\TransformerInterface $transformer |
||
57 | * |
||
58 | * @return $this |
||
59 | */ |
||
60 | public static function configure( |
||
69 | |||
70 | /** |
||
71 | * @param string $userToken |
||
72 | * @param string $appIdentifier |
||
73 | * @param string $appSecret |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | public static function create(string $userToken = null, string $appIdentifier = null, string $appSecret = null) |
||
87 | |||
88 | /** |
||
89 | * @return \Http\Client\HttpClient |
||
90 | */ |
||
91 | public function getHttpClient() |
||
95 | |||
96 | /** |
||
97 | * @param \Http\Client\HttpClient $httpClient |
||
98 | */ |
||
99 | public function setHttpClient(HttpClient $httpClient) |
||
103 | |||
104 | /** |
||
105 | * @return \Http\Message\RequestFactory |
||
106 | */ |
||
107 | public function getRequestFactory() |
||
111 | |||
112 | /** |
||
113 | * @param \Http\Message\RequestFactory $requestFactory |
||
114 | */ |
||
115 | public function setRequestFactory(RequestFactory $requestFactory) |
||
119 | |||
120 | /** |
||
121 | * @return \Fnayou\InstapushPHP\Transformer\TransformerInterface |
||
122 | */ |
||
123 | public function getTransformer() |
||
127 | |||
128 | /** |
||
129 | * @param \Fnayou\InstapushPHP\Transformer\TransformerInterface $transformer |
||
130 | */ |
||
131 | public function setTransformer(TransformerInterface $transformer) |
||
135 | |||
136 | /** |
||
137 | * @return bool |
||
138 | */ |
||
139 | public function isException() |
||
143 | |||
144 | /** |
||
145 | * @param bool $exception |
||
146 | */ |
||
147 | public function setException(bool $exception) |
||
151 | |||
152 | /** |
||
153 | * @return Api\ApplicationsApi |
||
154 | */ |
||
155 | public function applications() |
||
159 | } |
||
160 |