https://github.com/brazanation/php-states
Library to provides Brazilian States as Value Objects in PHP
https://github.com/brazanation/php-states
brasil braza brazil brazilian estados php php7 states
Last synced: 6 months ago
JSON representation
Library to provides Brazilian States as Value Objects in PHP
- Host: GitHub
- URL: https://github.com/brazanation/php-states
- Owner: brazanation
- Created: 2017-02-02T16:59:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-01T06:10:44.000Z (over 7 years ago)
- Last Synced: 2025-04-17T01:36:52.656Z (6 months ago)
- Topics: brasil, braza, brazil, brazilian, estados, php, php7, states
- Language: PHP
- Size: 20.5 KB
- Stars: 25
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Brazanation States
=====================
[](https://travis-ci.org/brazanation/php-states)
[](https://scrutinizer-ci.com/g/brazanation/php-states/?branch=master)
[](https://scrutinizer-ci.com/g/brazanation/php-states/?branch=master)
[](https://styleci.io/repos/80746816)
A PHP library to provide Brazilian States safer, easier and fun!
Installation
------------
Install the library using [composer][1]. Add the following to your `composer.json`:
```json
{
"require": {
"brazanation/states": "dev-master"
}
}
```
Now run the `install` command.
```sh
$ composer.phar install
```
or
```sh
$ composer require brazanation/states dev-master
```
### Usage
```php
use Brazanation\States\State;
$state = State::acre();
echo $state->fullName; // Acre
echo $state->shortName; // AC
echo $state->code; // 12
echo $state->timezone; // America/Rio_Branco
```
or
```php
use Brazanation\States\Acre;
$state = new Acre();
echo $state->fullName; // Acre
echo $state->shortName; // AC
echo $state->code; // 12
echo $state->timezone; // America/Rio_Branco
```
### License
MIT, hell yeah!
[1]: http://getcomposer.org/