2017 © Pedro Peláez
 

library telex

image

danbettles/telex

  • Monday, July 9, 2018
  • by danbettles
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Telex

Telex finds telephone numbers in text., (*1)

Telex is used by SeeTheWorld., (*2)

Usage

For now:, (*3)

use DanBettles\Telex\Telex;
use DanBettles\Telex\NumberFinder;
use DanBettles\Telex\CountryTelephoneNumberMatcherFactory;

$telex = new Telex(new NumberFinder(), new CountryTelephoneNumberMatcherFactory());
$matches = $telex->findAll('A UK landline number: (01234) 567 890.  A UK mobile number: +44 (0)7123 456 789.');

TODO

  • Encode patterns for area codes, and well-structured local numbers, whenever practicable, to increase the precision of the matcher.
  • Write more tests, especially for Telex.
  • Handle multiple adjacent numbers.
  • Add logging to the find methods in Telex to make it easier to identify the causes of mismatches.

Background

Having written something horribly inflexible to deal with European telephone numbers, I wanted to see if I could write something relatively simple - and a little more elegant - that would detect any telephone number with a degree of precision. Telex is certainly more elegant, and probably more useful, than my previous solution, but it's still far from being perfect - it's still too naive, I think. It's an interesting challenge and we'd appreciate your input - thank you., (*4)

The Versions

09/07 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

09/07 2018

v0.0.0-alpha.1

0.0.0.0-alpha1

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

05/02 2017

v0.0.0-alpha.0

0.0.0.0-alpha0

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires