PHPackages                             azteck/haiti-localities - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. azteck/haiti-localities

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

azteck/haiti-localities
=======================

Liste complète des localités d’Haïti (départements, arrondissements, communes, sections communales)

1.0.0(7mo ago)016MITPHPPHP &gt;=7.4CI passing

Since Nov 21Pushed 7mo agoCompare

[ Source](https://github.com/AzTechKonbit/haiti-localities)[ Packagist](https://packagist.org/packages/azteck/haiti-localities)[ RSS](/packages/azteck-haiti-localities/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Haiti Localities
================

[](#haiti-localities)

[![Packagist Version](https://camo.githubusercontent.com/6ca330efa68b6f5c35c8a4789bda2fa7fb8207bb1d5f28060f8a54f666fc77a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617a7465636b2f68616974692d6c6f63616c69746965732e737667)](https://packagist.org/packages/azteck/haiti-localities)[![License](https://camo.githubusercontent.com/c0df52eb535e7111713d8a8ee979993308ad1c8b86f77292c9e2c62a74caf646/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f617a7465636b2f68616974692d6c6f63616c69746965732e737667)](https://github.com/AzTechKonbit/haiti-localities/blob/master/LICENSE.md)[![Build Status](https://github.com/AzTechKonbit/haiti-localities/actions/workflows/php.yml/badge.svg)](https://github.com/AzTechKonbit/haiti-localities/actions/workflows/php.yml)

Bibliothèque PHP fournissant l’ensemble des **départements**, **arrondissements**, **communes** et **sections communales** d’Haïti, ainsi que des méthodes pour filtrer et rechercher ces localités.

---

Table des matières
------------------

[](#table-des-matières)

- [Installation](#installation)
- [Utilisation](#utilisation)
    - [Initialisation](#initialisation)
    - [Récupérer les données principales](#r%C3%A9cup%C3%A9rer-les-donn%C3%A9es-principales)
        - [Départements](#d%C3%A9partements)
        - [Arrondissements](#arrondissements)
        - [Communes](#communes)
        - [Sections Communales](#sections-communales)
    - [Méthodes de filtrage](#m%C3%A9thodes-de-filtrage)
    - [Recherche](#recherche)
- [Exemple complet](#exemple-complet)
- [Tests](#tests)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)

---

Installation
------------

[](#installation)

```
composer require azteck/haiti-localities
```

---

Utilisation
-----------

[](#utilisation)

### Initialisation

[](#initialisation)

```
require 'vendor/autoload.php';

$h = new \Azteck\HaitiLocalities();
```

---

Récupérer les données principales
---------------------------------

[](#récupérer-les-données-principales)

### Départements

[](#départements)

```
$departements = $h->getDepartements();
echo $departements;
```

**Exemple de sortie :**

```
[
  {"name":"Artibonite","parent":"HAITI","type":"Departements"},
  {"name":"Centre","parent":"HAITI","type":"Departements"},
  {"name":"Grand'Anse","parent":"HAITI","type":"Departements"},
  {"name":"Nippes","parent":"HAITI","type":"Departements"},
  {"name":"Nord","parent":"HAITI","type":"Departements"},
  {"name":"Nord Est","parent":"HAITI","type":"Departements"},
  {"name":"Nord Ouest","parent":"HAITI","type":"Departements"},
  {"name":"Ouest","parent":"HAITI","type":"Departements"},
  {"name":"Sud","parent":"HAITI","type":"Departements"},
  {"name":"Sud Est","parent":"HAITI","type":"Departements"}
]
```

---

### Arrondissements

[](#arrondissements)

```
$arrondissements = $h->getArrondissements();
echo $arrondissements;
```

**Exemple de sortie :**

```
[
  {"name":"Dessalines","parent":"Artibonite"},
  {"name":"Gonaïves","parent":"Artibonite"},
  {"name":"Gros Morne","parent":"Artibonite"},
  {"name":"Marmelade","parent":"Artibonite"},
  {"name":"Saint Marc","parent":"Artibonite"}
]
```

---

### Communes

[](#communes)

```
$communes = $h->getCommunes();
echo $communes;
```

**Exemple de sortie :**

```
[
  {"name":"Dessalines","parent":"Dessalines"},
  {"name":"Desdunes","parent":"Dessalines"},
  {"name":"Grande Saline","parent":"Dessalines"},
  {"name":"Petite Rivière de l'Artibonite","parent":"Dessalines"}
]
```

---

### Sections Communales

[](#sections-communales)

```
$sections = $h->getSectionCommunales();
echo $sections;
```

**Exemple de sortie :**

```
[
  {"name":"Villard","parent":"Dessalines"},
  {"name":"Fosse Naboth","parent":"Dessalines"},
  {"name":"Ogé","parent":"Dessalines"},
  {"name":"Poste Pierrot","parent":"Dessalines"},
  {"name":"Fiéfè Petit Cahos","parent":"Dessalines"},
  {"name":"ll Croix","parent":"Dessalines"}
]
```

---

Méthodes de filtrage
--------------------

[](#méthodes-de-filtrage)

### Arrondissements d’un département

[](#arrondissements-dun-département)

```
echo $h->getArrondissementsByDepartement("Artibonite");
```

### Communes d’un arrondissement

[](#communes-dun-arrondissement)

```
echo $h->getCommuneByArrondissements("Dessalines");
```

### Sections communales d’une commune

[](#sections-communales-dune-commune)

```
echo $h->getSectionCommunaleByCommune("Dessalines");
```

---

Recherche
---------

[](#recherche)

Recherche partielle insensible à la casse :

```
echo $h->find("rivi");
```

**Exemple de résultats :**

```
[
  {"name":"Rivière de Bayonnais","parent":"Gonaïves","type":"SectionCommunales"},
  {"name":"Rivière Mancelle","parent":"Gros Morne","type":"SectionCommunales"},
  {"name":"Rivière Blanche","parent":"Gros Morne","type":"SectionCommunales"},
  {"name":"Rivière Canot Canot ous","parent":"Saut d'Eau","type":"SectionCommunales"},
  {"name":"Petite Rivière","parent":"Léogâne","type":"SectionCommunales"},
  {"name":"Grande Rivière Joly","parent":"Anse à Veau","type":"SectionCommunales"}
]
```

---

Exemple complet
---------------

[](#exemple-complet)

```

```

---

Tests
-----

[](#tests)

Les tests PHPUnit sont inclus dans `/tests` :

```
composer test
```

---

Contributing
------------

[](#contributing)

1. Forkez le projet
2. Créez votre branche (`git checkout -b feature/ma-nouvelle-fonction`)
3. Committez vos modifications (`git commit -am 'Ajout d’une fonctionnalité'`)
4. Poussez votre branche (`git push origin feature/ma-nouvelle-fonction`)
5. Ouvrez une Pull Request

Merci de suivre les bonnes pratiques de code PHP et PSR-12.

---

Changelog
---------

[](#changelog)

### 1.0.0

[](#100)

- Première version stable
- Méthodes pour récupérer départements, arrondissements, communes et sections communales
- Méthodes de filtrage et recherche
- Tests unitaires PHPUnit inclus

---

License
-------

[](#license)

MIT License. Voir le fichier [LICENSE](https://github.com/azteck/haiti-localities/blob/main/LICENSE).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance64

Regular maintenance activity

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

225d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/66652301?v=4)[Dupy007](/maintainers/Dupy007)[@Dupy007](https://github.com/Dupy007)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/azteck-haiti-localities/health.svg)

```
[![Health](https://phpackages.com/badges/azteck-haiti-localities/health.svg)](https://phpackages.com/packages/azteck-haiti-localities)
```

###  Alternatives

[finecho/logistics

A logistics SDK.

18729.9k1](/packages/finecho-logistics)[miya/gh-auto-updater

441.8k](/packages/miya-gh-auto-updater)[szepeviktor/sentencepress

OOP toolkit for daily tasks in WordPress development.

111.4k](/packages/szepeviktor-sentencepress)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
