Neuron-PHP

PhoneNumber
in package
implements IFormatter

Formats phone numbers.

Table of Contents

Interfaces

IFormatter
Formatter interface for data transformation and display formatting.

Methods

format()  : string|null
Formats the provided data according to the formatter's rules.
format10Digit()  : string
format7Digit()  : string
formatInternational()  : string

Methods

format()

Formats the provided data according to the formatter's rules.

public format(string $data) : string|null
Parameters
$data : string
Return values
string|null

format10Digit()

protected format10Digit(array<string|int, mixed>|string|null $phone) : string
Parameters
$phone : array<string|int, mixed>|string|null
Return values
string

format7Digit()

protected format7Digit(array<string|int, mixed>|string|null $phone) : string
Parameters
$phone : array<string|int, mixed>|string|null
Return values
string

formatInternational()

protected formatInternational(array<string|int, mixed>|string|null $phone) : string
Parameters
$phone : array<string|int, mixed>|string|null
Return values
string

        
On this page

Search results