ebidtech / geoziplocation
Geo zipcode location
Installs: 8 815
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 12
Forks: 0
Open Issues: 0
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: >=4.0
README
Given zipcode returns location
Sample USAGE:
$myFactory = new TranslatorFactory();
$ptTranslator = $myFactory->create('PT');
$region = $ptTranslator->getLocationForZip('4730');
$region->getType(); //returns "region"
$region->getName(); //returns "Norte"
$region->getId();
if ($region->hasSubLocation()) {
$zone = $region->getSubLocation();
$zone->getType(); //returns "zone"
$zone->getName(); //returns "Braga"
$zone->getId();
if ($zone->hasSubLocation()) {
$area = $zone->getSubLocation();
$area->getType(); //returns "area"
$area->getName(); //returns "Vila Verde"
$area->getId();
}
}