function _countries_estimate_property_type in Countries 8
Same name and namespace in other branches
- 7.2 countries.module \_countries_estimate_property_type()
Private internal helper function to estimate the property type.
1 call to _countries_estimate_property_type()
- countries_country_lookup in ./
countries.module - A helper function to find a country based on any country property.
File
- ./
countries.module, line 897 - Defines the field and entity information for countries.
Code
function _countries_estimate_property_type($value) {
if (is_numeric($value)) {
return 'numcode';
}
switch (drupal_strlen($value)) {
case 2:
return 'iso2';
case 3:
return 'iso3';
default:
return 'name';
}
}