library swissplace
Deliver zip for cantons, regions and districts
hegland/swissplace
Deliver zip for cantons, regions and districts
- Tuesday, June 13, 2017
- by rogerhegland
- Repository
- 1 Watchers
- 0 Stars
- 196 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 7 % Grown
swissplaces
Deliver zip for cantons, regions and districts, (*1)
Cantons
Get postalcodes of all cantons
Get postalcodes of desired canton(s)
Canton::getPostalcodes('TG,SG,AG')
or, (*2)
Canton::getPostalcodes(array('TG', 'SG', 'AG'))
Districts
Get postalcodes of all districts
District::getPostalcodes()
Get postalcodes of all districts from the given canton
- District::getPostalcodes('TG')
or, (*3)
- District::getPostalcodes([ 'TG' ])
or, (*4)
- District::getPostalcodes([ 'TG' => [ ] ])
Get postalcodes of all districts from the given cantons
- District::getPostalcodes('TG;LU')
or, (*5)
- District::getPostalcodes([ 'TG', 'LU' ])
or, (*6)
- District::getPostalcodes([ 'TG' => [ ], 'LU' => [ ] ])
Get postalcodes of the given district
- District::getPostalcodes('TG:Arbon')
or, (*7)
- District::getPostalcodes([ 'TG' => [ 'Arbon' ] ])
Get postalcodes of the given districts
- District::getPostalcodes('TG:Arbon,Kreuzlingen')
or, (*8)
- District::getPostalcodes([ 'TG' => [ 'Arbon' ], 'AG' => [ 'Aarau', 'Brugg' ] ])
Regions
// coming soon, (*9)