static function get_Country($country_code = NULL)
{
if (empty(self::$country_list)) {
$resource = json_decode(file_get_contents(CLASSES . "PHPFusion/Geomap/Countries.json"));
foreach ($resource as $object) {
$country_name = $object->name->common;
self::$country_list[$object->cca2] = $country_name;
}
}
if ($country_code !== NULL) {
return isset(self::$country_list[$country_code]) ? self::$country_list[$country_code] : NULL;
} else {
return array_filter(self::$country_list);
}
}