1 | <?php |
||
19 | class HttpClientConfigurator extends AbstractHttpClientConfigurator implements HttpClientConfiguratorInterface |
||
20 | { |
||
21 | const USER_AGENT = 'fnayou/instapush-php'; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $endpoint = 'http://api.instapush.im/v1'; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $apiUserToken; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private $apiAppIdentifier; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | private $apiAppSecret; |
||
42 | |||
43 | /** |
||
44 | * @return \Http\Client\HttpClient |
||
45 | */ |
||
46 | public function createConfiguredClient() |
||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getEndpoint() |
||
62 | |||
63 | /** |
||
64 | * @param string $endpoint |
||
65 | * |
||
66 | * @return $this |
||
67 | */ |
||
68 | public function setEndpoint(string $endpoint) |
||
74 | |||
75 | /** |
||
76 | * @return string |
||
77 | */ |
||
78 | public function getApiUserToken() |
||
82 | |||
83 | /** |
||
84 | * @param string $apiUserToken |
||
85 | * |
||
86 | * @return $this |
||
87 | */ |
||
88 | public function setApiUserToken(string $apiUserToken = null) |
||
94 | |||
95 | /** |
||
96 | * @return string |
||
97 | */ |
||
98 | public function getApiAppIdentifier() |
||
102 | |||
103 | /** |
||
104 | * @param string $apiAppIdentifier |
||
105 | * |
||
106 | * @return $this |
||
107 | */ |
||
108 | public function setApiAppIdentifier(string $apiAppIdentifier = null) |
||
114 | |||
115 | /** |
||
116 | * @return string |
||
117 | */ |
||
118 | public function getApiAppSecret() |
||
122 | |||
123 | /** |
||
124 | * @param string $apiAppSecret |
||
125 | * |
||
126 | * @return $this |
||
127 | */ |
||
128 | public function setApiAppSecret(string $apiAppSecret = null) |
||
134 | |||
135 | /** |
||
136 | * @return array |
||
137 | */ |
||
138 | private function getHeaders() |
||
158 | } |
||
159 |