1 | <?php |
||
21 | class Command extends \Symfony\Component\Console\Command\Command |
||
22 | { |
||
23 | /** |
||
24 | * Available providers. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | private $providers = [ |
||
29 | 'free_geo_ip' => 'FreeGeoIp', |
||
30 | 'host_ip' => 'HostIp', |
||
31 | 'ip_info_db' => 'IpInfoDb', |
||
32 | 'google_maps' => 'GoogleMaps', |
||
33 | 'google_maps_business' => 'GoogleMapsBusiness', |
||
34 | 'bing_maps' => 'BingMaps', |
||
35 | 'openstreetmaps' => 'OpenStreetMap', |
||
36 | 'cloudmade' => 'CloudMade', |
||
37 | 'geoip' => 'Geoip', |
||
38 | 'map_quest' => 'MapQuest', |
||
39 | 'oio_rest' => 'OIORest', |
||
40 | 'geocoder_ca' => 'GeocoderCa', |
||
41 | 'geocoder_us' => 'GeocoderUs', |
||
42 | 'ign_openls' => 'IGNOpenLS', |
||
43 | 'data_science_toolkit' => 'DataScienceToolkit', |
||
44 | 'yandex' => 'Yandex', |
||
45 | 'geo_plugin' => 'GeoPlugin', |
||
46 | 'geo_ips' => 'GeoIPs', |
||
47 | 'maxmind' => 'MaxMind', |
||
48 | 'geonames' => 'Geonames', |
||
49 | 'ip_geo_base' => 'IpGeoBase', |
||
50 | 'baidu' => 'Baidu', |
||
51 | 'tomtom' => 'TomTom', |
||
52 | 'arcgis_online' => 'ArcGISOnline', |
||
53 | ]; |
||
54 | |||
55 | /** |
||
56 | * Available dumpers. |
||
57 | * |
||
58 | * @var array |
||
59 | */ |
||
60 | private $dumpers = [ |
||
61 | 'gpx' => 'Gpx', |
||
62 | 'geojson' => 'GeoJson', |
||
63 | 'kml' => 'Kml', |
||
64 | 'wkb' => 'Wkb', |
||
65 | 'wkt' => 'Wkt', |
||
66 | ]; |
||
67 | |||
68 | |||
69 | /** |
||
70 | * @param string $factoryCallable |
||
71 | * |
||
72 | * @return CacheItemPoolInterface |
||
73 | */ |
||
74 | protected function getCache($factoryCallable) |
||
88 | |||
89 | /** |
||
90 | * Returns the provider class name. |
||
91 | * The default provider is Google Maps. |
||
92 | * |
||
93 | * @param string $provider The name of the provider to use. |
||
94 | * |
||
95 | * @return string The name of the provider class to use. |
||
96 | */ |
||
97 | protected function getProvider($provider) |
||
106 | |||
107 | /** |
||
108 | * Returns the list of available providers sorted by alphabetical order. |
||
109 | * |
||
110 | * @return string The list of available providers comma separated. |
||
111 | */ |
||
112 | protected function getProviders() |
||
118 | |||
119 | /** |
||
120 | * Returns the dumper class name. |
||
121 | * The default dumper is WktDumper. |
||
122 | * |
||
123 | * @param string $dumper The name of the dumper to use. |
||
124 | * |
||
125 | 3 | * @return string The name of the dumper class to use. |
|
126 | */ |
||
127 | 3 | protected function getDumper($dumper) |
|
136 | |||
137 | /** |
||
138 | * Returns the list of available dumpers sorted by alphabetical order. |
||
139 | * |
||
140 | * @return string The list of available dumpers comma separated. |
||
141 | */ |
||
142 | protected function getDumpers() |
||
148 | |||
149 | /** |
||
150 | * Make a string lowercase. |
||
151 | * |
||
152 | * @param string $string A string to lowercase. |
||
153 | * |
||
154 | * @return string The lowercased string. |
||
155 | 3 | */ |
|
156 | private function lowerize($string) |
||
160 | } |
||
161 |