\Overtrue\EasySmsPhoneNumber

Class PhoneNumberInterface.

Summary

Methods
Properties
Constants
__construct()
getIDDCode()
getNumber()
getUniversalNumber()
getZeroPrefixedNumber()
getPrefixedIDDCode()
__toString()
jsonSerialize()
inChineseMainland()
No public properties found
No constants found
No protected methods found
$number
$IDDCode
N/A
No private methods found
No private properties found
N/A

Properties

$number

$number : int

Type

int

$IDDCode

$IDDCode : int

Type

int

Methods

__construct()

__construct(int  $numberWithoutIDDCode, string  $IDDCode = null) : mixed

PhoneNumberInterface constructor.

Parameters

int $numberWithoutIDDCode
string $IDDCode

Returns

mixed —

getIDDCode()

getIDDCode() : int

86.

Returns

int —

getNumber()

getNumber() : int

18888888888.

Returns

int —

getUniversalNumber()

getUniversalNumber() : string

+8618888888888.

Returns

string —

getZeroPrefixedNumber()

getZeroPrefixedNumber() : string

008618888888888.

Returns

string —

getPrefixedIDDCode()

getPrefixedIDDCode(string  $prefix) : string|null

Parameters

string $prefix

Returns

string|null —

__toString()

__toString() : string

Returns

string —

jsonSerialize()

jsonSerialize() : mixed

Specify data which should be serialized to JSON.

Returns

mixed —

data which can be serialized by json_encode, which is a value of any type other than a resource

inChineseMainland()

inChineseMainland() : bool

Check if the phone number belongs to chinese mainland.

Returns

bool —