Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
factor_sms\helper Class Reference

Static Public Member Functions

static format_number (string $phonenumber)
 This function internationalises a number to E.164 standard.
 
static is_valid_phonenumber (string $phonenumber)
 Validate phone number with E.164 format.
 

Member Function Documentation

◆ format_number()

static factor_sms\helper::format_number ( string $phonenumber)
static

This function internationalises a number to E.164 standard.

https://46elks.com/kb/e164

Parameters
string$phonenumberthe phone number to format.
Return values
stringthe formatted phone number.

◆ is_valid_phonenumber()

static factor_sms\helper::is_valid_phonenumber ( string $phonenumber)
static

Validate phone number with E.164 format.

https://en.wikipedia.org/wiki/E.164

Parameters
string$phonenumberfrom the given user input
Return values
bool

The documentation for this class was generated from the following file: