1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-19 05:46:09 +00:00
ocsms/lib/vendor/giggsey/libphonenumber-for-php/src/MatcherAPIInterface.php
Greg Ross 6e86c48486 Updated phone formatter (#241)
* Add locale and libphonenumber libraries.

* Update country code information

Updated existing country codes, fixed incorrect NANP codes for member countries (as well as several UK based ones).

Also added in Country Name to ISO country code mapping array for use with libphonenumber.

* Convert phone number formatting to use libphonenumber

libphonenumber parses phone number more consistantly than the old regex's that mismatched number on a regular basis.
2018-06-26 09:49:22 +02:00

27 lines
760 B
PHP

<?php
namespace libphonenumber;
/**
* Interface MatcherAPIInterface
*
* Internal phonenumber matching API used to isolate the underlying implementation of the
* matcher and allow different implementations to be swapped in easily.
*
* @package libphonenumber
* @internal
*/
interface MatcherAPIInterface
{
/**
* Returns whether the given national number (a string containing only decimal digits) matches
* the national number pattern defined in the given {@code PhoneNumberDesc} message.
*
* @param string $number
* @param PhoneNumberDesc $numberDesc
* @param boolean $allowPrefixMatch
* @return boolean
*/
public function matchNationalNumber($number, PhoneNumberDesc $numberDesc, $allowPrefixMatch);
}