kouinkouin/street-parser

A PHP library to split an address street to street, number, box, ...

v0.3.0 2024-04-19 08:12 UTC

This package is not auto-updated.

Last update: 2024-12-13 11:33:58 UTC


README

Scrutinizer Code Quality Code Coverage Build Status

StreetParser

A PHP library to split an address street to street name, number, box, ...

Installation

$ composer require kouinkouin/street-parser

Usage

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

use kouinkouin\StreetParser\StreetParser;

$streetParser = new StreetParser();
$street = $streetParser->getStreetDataFromFullStreet('Rue du grand Duc, 13/B1');
var_dump($street->getName()); // string(16) "Rue du grand Duc"
var_dump($street->getNumber()); // string(2) "13"
var_dump($street->getBox()); // string(2) "B1"