1 | <?php |
||
16 | class GeoGetter |
||
17 | { |
||
18 | /** |
||
19 | * Gets country code by IP |
||
20 | * |
||
21 | * @param null|string |
||
22 | * |
||
23 | * @return null|string |
||
24 | */ |
||
25 | public static function getCountryCode($ip = null): ?string |
||
31 | |||
32 | /** |
||
33 | * Gets country name by IP |
||
34 | * |
||
35 | * @param null|string |
||
36 | * |
||
37 | * @return null|string |
||
38 | */ |
||
39 | public static function getCountryName($ip = null): ?string |
||
45 | |||
46 | /** |
||
47 | * Gets region by IP |
||
48 | * |
||
49 | * @param null|string $ip |
||
50 | * |
||
51 | * @return null|string |
||
52 | */ |
||
53 | public static function getRegion($ip = null): ?string |
||
59 | |||
60 | /** |
||
61 | * Gets region name by IP |
||
62 | * |
||
63 | * @param null|string $ip |
||
64 | * |
||
65 | * @return null|string |
||
66 | */ |
||
67 | public static function getRegionName($ip = null): ?string |
||
73 | |||
74 | /** |
||
75 | * Gets region code by IP |
||
76 | * |
||
77 | * @param null|string $ip |
||
78 | * |
||
79 | * @return null|string |
||
80 | */ |
||
81 | public static function getRegionCode($ip = null): ?string |
||
87 | |||
88 | /** |
||
89 | * Gets city by IP |
||
90 | * |
||
91 | * @param null|string $ip |
||
92 | * |
||
93 | * @return null|string |
||
94 | */ |
||
95 | public static function getCity($ip = null): ?string |
||
101 | |||
102 | /** |
||
103 | * Gets latitude by IP |
||
104 | * |
||
105 | * @param null|string $ip |
||
106 | * |
||
107 | * @return null|string |
||
108 | */ |
||
109 | public static function getLatitude($ip = null): ?string |
||
115 | |||
116 | /** |
||
117 | * Gets longitude by IP |
||
118 | * |
||
119 | * @param null|string $ip |
||
120 | * |
||
121 | * @return null|string |
||
122 | */ |
||
123 | public static function getLongitude($ip = null): ?string |
||
129 | |||
130 | /** |
||
131 | * Returns geo component |
||
132 | * |
||
133 | * @return GeoFinderInterface |
||
134 | */ |
||
135 | public static function getGeoManager(): GeoFinderInterface |
||
139 | } |
||
140 |