1 | <?php |
||
11 | class IPStackFinder |
||
12 | { |
||
13 | /** @var string */ |
||
14 | const BASE_URI = 'http://api.ipstack.com/'; |
||
15 | |||
16 | /** @var Client $client */ |
||
17 | public $client; |
||
18 | |||
19 | /** @var array $supportedLanguages */ |
||
20 | private $supportedLanguages = [ |
||
21 | 'en', // English/US |
||
22 | 'de', // German |
||
23 | 'es', // Spanish |
||
24 | 'fr', // French |
||
25 | 'ja', // Japanese |
||
26 | 'pt-br', // Portugues (Brazil) |
||
27 | 'ru', // Russian |
||
28 | 'zh', // Chinese |
||
29 | ]; |
||
30 | |||
31 | /** |
||
32 | * IPStackHelper constructor. |
||
33 | */ |
||
34 | public function __construct() |
||
44 | |||
45 | /** |
||
46 | * @param $ipAddress |
||
47 | * @return array |
||
48 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
49 | */ |
||
50 | public function get($ipAddress) : array |
||
61 | } |
||
62 |