Download the PHP package carloswph/ibgecode-php without Composer
On this page you can find all versions of the php package carloswph/ibgecode-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package ibgecode-php
ibgecode-php
Simple library to retrieve Brazilian city and respective state from the IBGE code.
Installation
Just require the library using Composer composer require carloswph/ibgecode-php
.
Usage
Simply autoload and instantiate the IBGE class - including an array of the searched codes as parameter. From the initial instance, the class admits methods to get the respective city, the state or both. All methods return an array of results.
An additional chained method is available to return JSON, as follows.
$try = new IBGE(['5200050', '2300101', '99999999999']);
$try->getCity(); // return an array of city names for each code
$json = $try->toJson();
echo $json;
// Results in:
// [{"cidade":"Abadia de Goi\u00e1s","estado":"GO"},{"cidade":"Abaiara","estado":"CE"},["C\u00f3digo Inexistente."]]
// The toJson() method admits the parameter true, which returns the JSON response in pretty print format.
All versions of ibgecode-php with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.0.1
The package carloswph/ibgecode-php contains the following files
Loading the files please wait ....