\Horde_Idna_Punycode

Punycode implementation as described in RFC 3492.

Original code (v1.0.1; released under the MIT License): https://github.com/true/php-punycode/

Summary

Methods
Properties
Constants
encode()
decode()
No public properties found
BASE
TMIN
TMAX
SKEW
DAMP
INITIAL_BIAS
INITIAL_N
PREFIX
DELIMITER
_encodePart()
_decodePart()
_calculateThreshold()
_adapt()
_codePoints()
_charToCodePoint()
_codePointToChar()
$_encodeTable
$_decodeTable
N/A
No private methods found
No private properties found
N/A

Constants

BASE

BASE

Bootstring parameter values.

TMIN

TMIN

TMAX

TMAX

SKEW

SKEW

DAMP

DAMP

INITIAL_BIAS

INITIAL_BIAS

INITIAL_N

INITIAL_N

PREFIX

PREFIX

DELIMITER

DELIMITER

Properties

$_encodeTable

$_encodeTable : 

Encode table.

Type

$_decodeTable

$_decodeTable : 

Decode table.

Type

Methods

encode()

encode(string  $input) : string

Encode a domain to its Punycode version.

Parameters

string $input

Domain name in Unicde to be encoded.

Returns

string —

Punycode representation in ASCII.

decode()

decode(string  $input) : string

Decode a Punycode domain name to its Unicode counterpart.

Parameters

string $input

Domain name in Punycode

Returns

string —

Unicode domain name.

_encodePart()

_encodePart(string  $input) : string

Encode a part of a domain name, such as tld, to its Punycode version.

Parameters

string $input

Part of a domain name.

Returns

string —

Punycode representation of a domain part.

_decodePart()

_decodePart(string  $input) : string

Decode a part of domain name, such as tld.

Parameters

string $input

Part of a domain name.

Returns

string —

Unicode domain part.

_calculateThreshold()

_calculateThreshold(integer  $k, integer  $bias) : integer

Calculate the bias threshold to fall between TMIN and TMAX.

Parameters

integer $k
integer $bias

Returns

integer

_adapt()

_adapt(integer  $delta, integer  $numPoints, boolean  $firstTime) : integer

Bias adaptation.

Parameters

integer $delta
integer $numPoints
boolean $firstTime

Returns

integer

_codePoints()

_codePoints(string  $input) : array

List code points for a given input.

Parameters

string $input

Returns

array —

Multi-dimension array with basic, non-basic and aggregated code points.

_charToCodePoint()

_charToCodePoint(string  $char) : integer

Convert a single or multi-byte character to its code point.

Parameters

string $char

Returns

integer

_codePointToChar()

_codePointToChar(integer  $code) : string

Convert a code point to its single or multi-byte character

Parameters

integer $code

Returns

string