You are here

public function MobileNumberUtilInterface::getMobileNumber in Mobile Number 2.0.x

Same name and namespace in other branches
  1. 8 src/MobileNumberUtilInterface.php \Drupal\mobile_number\MobileNumberUtilInterface::getMobileNumber()

Get mobile number object.

Parameters

string $number: Number.

null|string $country: Country.

array $types: Mobile number types to verify as defined in \libphonenumber\PhoneNumberType.

Return value

\libphonenumber\PhoneNumber|null Phone Number object if successful.

1 method overrides MobileNumberUtilInterface::getMobileNumber()
MobileNumberUtil::getMobileNumber in src/MobileNumberUtil.php
Get mobile number object.

File

src/MobileNumberUtilInterface.php, line 70

Class

MobileNumberUtilInterface
Provides an interface for mobile number utility.

Namespace

Drupal\mobile_number

Code

public function getMobileNumber($number, $country = NULL, $types = [
  1 => 1,
  2 => 2,
]);