Phone
Class Phone
Table of Contents
Methods
- extractNumbers() : array<string|int, mixed>
- getArrayUniqueValidate() : array<string|int, mixed>
- isInArray() : bool
- isSame() : bool
- normalize() : string|null
- Normalize phone number.
- parseText() : array<string|int, mixed>
- validate() : bool
- Validate phone number.
Methods
extractNumbers()
public
static extractNumbers(mixed $text) : array<string|int, mixed>
Parameters
- $text : mixed
Return values
array<string|int, mixed>getArrayUniqueValidate()
public
static getArrayUniqueValidate(mixed $phones) : array<string|int, mixed>
Parameters
- $phones : mixed
Return values
array<string|int, mixed>isInArray()
public
static isInArray(mixed $phones, mixed $searchPhone) : bool
Parameters
- $phones : mixed
- $searchPhone : mixed
Return values
boolisSame()
public
static isSame(mixed $phone1, mixed $phone2) : bool
Parameters
- $phone1 : mixed
- $phone2 : mixed
Return values
boolnormalize()
Normalize phone number.
public
static normalize(string $phone) : string|null
Parameters
- $phone : string
-
Phone number.
Return values
string|nullparseText()
public
static parseText(mixed $text) : array<string|int, mixed>
Parameters
- $text : mixed
Return values
array<string|int, mixed>validate()
Validate phone number.
public
static validate(string $phone) : bool
Parameters
- $phone : string
-
Phone number.