polem/departements

Simple french departments and areas library

Installs: 1 578

Dependents: 1

Stars: 2

Watchers: 1

Forks: 2

Language: PHP

0.0.10 2014-09-16 07:16 UTC

README

Installation

composer require polem/departements

Usage

use Departements\Datasource\JsonDatasource;
use Departements\Provider;

$file = __DIR__ . '/datas.json';
$datasource = new JsonDatasource($file);
$provider = new Provider($datasource);

// will return all departments
$provider->findAllDepartements();

// will return all departments
$provider->findAllRegions();