diff --git a/README.md b/README.md index f2cb73d..71f6338 100644 --- a/README.md +++ b/README.md @@ -15,36 +15,36 @@ Return `string` or `null` If something is invalid (bad number, unknown format or region), result is `null` ``` //06 05 04 03 02 -$result = \PhoneNumberOneLine::format('+33605040302', PhoneNumberOneLine::NATIONAL); +$result = \PhoneNumberShortcuts::format('+33605040302', PhoneNumberShortcuts::NATIONAL); //+33 6 05 04 03 02 -$result = \PhoneNumberOneLine::format('0605040302', PhoneNumberOneLine::INTERNATIONAL, 'FR'); +$result = \PhoneNumberShortcuts::format('0605040302', PhoneNumberShortcuts::INTERNATIONAL, 'FR'); ``` ### Validation Return `boolean` ``` //true -$isValid = \PhoneNumberOneLine::isValid('+33 607080910'); +$isValid = \PhoneNumberShortcuts::isValid('+33 607080910'); //true -$isValid = \PhoneNumberOneLine::isValid('+33 607080910', 'FR'); +$isValid = \PhoneNumberShortcuts::isValid('+33 607080910', 'FR'); //false -$isValid = \PhoneNumberOneLine::isValid('+1607080910', 'FR'); +$isValid = \PhoneNumberShortcuts::isValid('+1607080910', 'FR'); ``` ### Region Code Return `string` or `null` ``` //GB -$result = \PhoneNumberOneLine::getRegionCodeForNumber('+44 117 496 0123'); +$result = \PhoneNumberShortcuts::getRegionCodeForNumber('+44 117 496 0123'); //FR -$result = \PhoneNumberOneLine::getRegionCodeForNumber('+33 1 02 03 04 05'); +$result = \PhoneNumberShortcuts::getRegionCodeForNumber('+33 1 02 03 04 05'); //US -$result = \PhoneNumberOneLine::getRegionCodeForNumber('+12135096995'); +$result = \PhoneNumberShortcuts::getRegionCodeForNumber('+12135096995'); //null -$result = \PhoneNumberOneLine::getRegionCodeForNumber('notanumber'); +$result = \PhoneNumberShortcuts::getRegionCodeForNumber('notanumber'); ```