Download the PHP package upgradelabs/swiss-zip-code-resolver without Composer
On this page you can find all versions of the php package upgradelabs/swiss-zip-code-resolver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download upgradelabs/swiss-zip-code-resolver
More information about upgradelabs/swiss-zip-code-resolver
Files in upgradelabs/swiss-zip-code-resolver
Package swiss-zip-code-resolver
Short Description A resolver for Swiss zip codes (PLZ).
License Apache-2.0
Homepage https://github.com/upgradelabs/SwissZipCodeResolver
Informations about the package swiss-zip-code-resolver
:warning: This project is a fork of onlime/swiss-zip-code-resolver
Onlime's Swiss Zip Code Resolver
Copyright (c) Onlime GmbH, https://www.onlime.ch
A simple zip code lookup library to get information like city, commune, canton, and coordinates (LV03) for a Swiss zip code (PLZ).
Installation
PHP versions 5.6 up to PHP 7.1 are currently supported.
The zip extension is required. PHP should be compiled with zip support by using the --enable-zip configure option.
It is recommended to use Composer to install the library.
You can also use any other PSR-4 compliant autoloader.
Usage
-
Create
Resolverobject -
Call
lookup()method -
Sample of a
Resultobject: -
You may choose from 5 different return types. The types are array, object, json, serialize and xml. By default it is object. If you want to change that call the format method before calling the parse method or provide the format to the constructor. If you are not using object and an error occurs, then exceptions will not be trapped within the response and thrown directly.
- The
Resolversupports the fluent interface on its setters, e.g.:
Credits
The data is provided and updated by GEO.ADMIN.CH:
- GEO.ADMIN.CH - Geoinformationsplattform der Schweizerischen Eidgenossenschaft
- Schweizerisches Katasterwesen - Amtliches Ortschaftenverzeichnis
- PLZO_CSV_LV03.zip
Issues
Please report any issues via https://github.com/Upgradelabs/SwissZipCodeResolver/issues
LICENSE and COPYRIGHT
Copyright (c) 2007 - 2016 Onlime Webhosting (https://www.onlime.ch)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
All versions of swiss-zip-code-resolver with dependencies
ext-zip Version *