gorriecoe\Link\View\Phone
Phone
Synopsis
class Phone
extends ViewableData
{
- // members
- protected PhoneNumberUtil $library;
- protected PhoneNumber $instance;
- protected int $phoneNumberFormat = PhoneNumberFormat::E164;
- protected $fromCountry;
- private static string $default_country = 'NZ';
- // methods
- public void __construct()
- public Phone International()
- public Phone National()
- public Phone. E164()
- public Phone RFC3966()
- public Phone To()
- public Phone From()
- public Phone LeadingZero()
- public HTML Render()
- public HTML forTemplate()
Hierarchy
Extends
- SilverStripe\View\ViewableData
Members
private
- $default_country
protected
- $fromCountry
—
string
The country the user is dialing from. - $instance — \libphonenumber\PhoneNumber
- $library — \libphonenumber\PhoneNumberUtil
- $phoneNumberFormat — int
Methods
public
- __construct()
- E164() — Format the phone number in E164 format
- From() — Set the country the user is dialing from.
- International() — Format the phone number in international format.
- LeadingZero() — Sets whether this phone number uses a leading zero.
- National() — Format the phone number in national format.
- RFC3966() — Format the phone number in RFC3966 format.
- Render()
- To() — Set the country to which the phone number belongs to.
- forTemplate()