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