PHP Class Contao\Idna

The class encodes and decodes internationalized domain names according to RFC 3490. It also contains two helper methods to encode e-mails and URLs. Usage: echo Idna::encode('bürger.de'); echo Idna::encodeEmail('mit@bürger.de'); echo Idna::encodeUrl('http://www.bürger.de');
Afficher le fichier Open project: contao/core-bundle Class Usage Examples

Méthodes publiques

Méthode Description
decode ( string $strDomain ) : string Decode an internationalized domain name
decodeEmail ( string $strEmail ) : string Decode the domain in an e-mail address
encode ( string $strDomain ) : string Encode an internationalized domain name
encodeEmail ( string $strEmail ) : string Encode the domain in an e-mail address
encodeUrl ( string $strUrl ) : string Encode the domain in an URL

Method Details

decode() public static méthode

Decode an internationalized domain name
public static decode ( string $strDomain ) : string
$strDomain string The domain name
Résultat string The decoded domain name

decodeEmail() public static méthode

Decode the domain in an e-mail address
public static decodeEmail ( string $strEmail ) : string
$strEmail string The e-mail address
Résultat string The decoded e-mail address

encode() public static méthode

Encode an internationalized domain name
public static encode ( string $strDomain ) : string
$strDomain string The domain name
Résultat string The encoded domain name

encodeEmail() public static méthode

Encode the domain in an e-mail address
public static encodeEmail ( string $strEmail ) : string
$strEmail string The e-mail address
Résultat string The encoded e-mail address

encodeUrl() public static méthode

Encode the domain in an URL
public static encodeUrl ( string $strUrl ) : string
$strUrl string The URL
Résultat string The encoded URL