TYPO3CMS
9.5
|
Public Member Functions | |
__construct (NamePrepDataInterface $NamePrepData, UnicodeTranscoderInterface $UnicodeTranscoder) | |
string | getPunycodePrefix () |
bool | validate ($encoded) |
mixed | decode ($encoded) |
mixed | encode ($decoded) |
Public Attributes | |
const | punycodePrefix = 'xn--' |
const | invalidUcs = 0x80000000 |
const | maxUcs = 0x10FFFF |
const | base = 36 |
const | tMin = 1 |
const | tMax = 26 |
const | skew = 38 |
const | damp = 700 |
const | initialBias = 72 |
const | initialN = 0x80 |
const | sBase = 0xAC00 |
const | lBase = 0x1100 |
const | vBase = 0x1161 |
const | tBase = 0x11A7 |
const | lCount = 19 |
const | vCount = 21 |
const | tCount = 28 |
const | nCount = 588 |
const | sCount = 11172 |
const | sLast = self::sBase + self::lCount * self::vCount * self::tCount |
Protected Member Functions | |
int | adapt ($delta, $npoints, $is_first) |
string | encodeDigit ($d) |
int | decodeDigit ($cp) |
string | namePrep ($input) |
array | hangulDecompose ($char) |
array | hangulCompose ($input) |
int | getCombiningClass ($char) |
array | applyCanonicalOrdering ($input) |
array | combine ($input) |
Static Protected Member Functions | |
static int | byteLength ($string) |
Protected Attributes | |
$NamePrepData | |
$UnicodeTranscoder | |
Static Protected Attributes | |
static | $isMbStringOverload = null |
Definition at line 33 of file Punycode.php.
Mso\IdnaConvert\Punycode::__construct | ( | NamePrepDataInterface | $NamePrepData, |
UnicodeTranscoderInterface | $UnicodeTranscoder | ||
) |
the constructor
$NamePrepData | NamePrepDataInterface inject NamePrepData object |
$UnicodeTranscoder | UnicodeTranscoderInterface inject Unicode Transcoder |
Implements Mso\IdnaConvert\PunycodeInterface.
Definition at line 69 of file Punycode.php.
References Mso\IdnaConvert\Punycode\$NamePrepData, and Mso\IdnaConvert\Punycode\$UnicodeTranscoder.
|
protected |
Adapt the bias according to the current code point and position
int | $delta | |
int | $npoints | |
int | $is_first |
Definition at line 271 of file Punycode.php.
References Mso\IdnaConvert\Punycode\base, and Mso\IdnaConvert\Punycode\tMin.
Referenced by Mso\IdnaConvert\Punycode\decode(), and Mso\IdnaConvert\Punycode\encode().
|
protected |
Applies the canonical ordering of a decomposed UCS4 sequence
array | $input | Decomposed UCS4 sequence |
Definition at line 476 of file Punycode.php.
References Mso\IdnaConvert\Punycode\getCombiningClass().
Referenced by Mso\IdnaConvert\Punycode\namePrep().
|
staticprotected |
Gets the length of a string in bytes even if mbstring function overloading is turned on
string | $string | the string for which to get the length. |
Definition at line 546 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\decode(), and Mso\IdnaConvert\Punycode\encode().
|
protected |
Do composition of a sequence of starter and non-starter
array | $input | UCS4 Decomposed sequence |
Definition at line 510 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\namePrep().
mixed Mso\IdnaConvert\Punycode::decode | ( | $encoded | ) |
The actual decoding algorithm
string |
Implements Mso\IdnaConvert\PunycodeInterface.
Definition at line 112 of file Punycode.php.
References Mso\IdnaConvert\Punycode\adapt(), Mso\IdnaConvert\Punycode\base, Mso\IdnaConvert\Punycode\byteLength(), Mso\IdnaConvert\Punycode\decodeDigit(), Mso\IdnaConvert\Punycode\initialBias, Mso\IdnaConvert\Punycode\initialN, Mso\IdnaConvert\Punycode\tMax, Mso\IdnaConvert\UnicodeTranscoder\ucs4array_utf8(), and Mso\IdnaConvert\Punycode\validate().
|
protected |
Decode a certain digit
int | $cp |
Definition at line 296 of file Punycode.php.
References Mso\IdnaConvert\Punycode\base.
Referenced by Mso\IdnaConvert\Punycode\decode().
mixed Mso\IdnaConvert\Punycode::encode | ( | $decoded | ) |
The actual encoding algorithm
array | $decoded |
Implements Mso\IdnaConvert\PunycodeInterface.
Definition at line 166 of file Punycode.php.
References Mso\IdnaConvert\Punycode\adapt(), Mso\IdnaConvert\Punycode\base, Mso\IdnaConvert\Punycode\byteLength(), Mso\IdnaConvert\Punycode\encodeDigit(), Mso\IdnaConvert\Punycode\initialBias, Mso\IdnaConvert\Punycode\initialN, Mso\IdnaConvert\Punycode\namePrep(), Mso\IdnaConvert\Punycode\tMax, and Mso\IdnaConvert\UnicodeTranscoder\utf8_ucs4array().
|
protected |
Encoding a certain digit
int | $d |
Definition at line 286 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\encode().
|
protected |
Returns the combining class of a certain wide char
int | $char | Wide char to check (32bit integer) |
Definition at line 464 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\applyCanonicalOrdering(), and Mso\IdnaConvert\Punycode\namePrep().
string Mso\IdnaConvert\Punycode::getPunycodePrefix | ( | ) |
Returns the used prefix for punycode-encoded strings
Implements Mso\IdnaConvert\PunycodeInterface.
Definition at line 84 of file Punycode.php.
References Mso\IdnaConvert\Punycode\punycodePrefix.
|
protected |
Ccomposes a Hangul syllable (see http://www.unicode.org/unicode/reports/tr15/#Hangul
array | $input | Decomposed UCS4 sequence |
Definition at line 422 of file Punycode.php.
References Mso\IdnaConvert\Punycode\lBase, Mso\IdnaConvert\Punycode\sBase, Mso\IdnaConvert\Punycode\tBase, Mso\IdnaConvert\Punycode\tCount, and Mso\IdnaConvert\Punycode\vBase.
Referenced by Mso\IdnaConvert\Punycode\namePrep().
|
protected |
Decomposes a Hangul syllable (see http://www.unicode.org/unicode/reports/tr15/#Hangul
int | 32bit UCS4 code point |
Definition at line 400 of file Punycode.php.
References Mso\IdnaConvert\Punycode\tCount.
Referenced by Mso\IdnaConvert\Punycode\namePrep().
|
protected |
Do Nameprep according to RFC3491 and RFC3454
array | $input | Unicode Characters |
Definition at line 318 of file Punycode.php.
References $output, Mso\IdnaConvert\Punycode\applyCanonicalOrdering(), Mso\IdnaConvert\Punycode\combine(), Mso\IdnaConvert\Punycode\getCombiningClass(), Mso\IdnaConvert\Punycode\hangulCompose(), and Mso\IdnaConvert\Punycode\hangulDecompose().
Referenced by Mso\IdnaConvert\Punycode\encode().
bool Mso\IdnaConvert\Punycode::validate | ( | $encoded | ) |
Checks, whether or not the provided string is a valid punycode string
string | $encoded |
Definition at line 94 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\decode().
|
staticprotected |
Definition at line 57 of file Punycode.php.
|
protected |
Definition at line 59 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\__construct().
|
protected |
Definition at line 60 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\__construct().
const Mso\IdnaConvert\Punycode::base = 36 |
Definition at line 39 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\adapt(), Mso\IdnaConvert\Punycode\decode(), Mso\IdnaConvert\Punycode\decodeDigit(), and Mso\IdnaConvert\Punycode\encode().
const Mso\IdnaConvert\Punycode::damp = 700 |
Definition at line 43 of file Punycode.php.
const Mso\IdnaConvert\Punycode::initialBias = 72 |
Definition at line 44 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\decode(), and Mso\IdnaConvert\Punycode\encode().
const Mso\IdnaConvert\Punycode::initialN = 0x80 |
Definition at line 45 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\decode(), and Mso\IdnaConvert\Punycode\encode().
const Mso\IdnaConvert\Punycode::invalidUcs = 0x80000000 |
Definition at line 37 of file Punycode.php.
const Mso\IdnaConvert\Punycode::lBase = 0x1100 |
Definition at line 47 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\hangulCompose().
const Mso\IdnaConvert\Punycode::lCount = 19 |
Definition at line 50 of file Punycode.php.
const Mso\IdnaConvert\Punycode::maxUcs = 0x10FFFF |
Definition at line 38 of file Punycode.php.
const Mso\IdnaConvert\Punycode::nCount = 588 |
Definition at line 53 of file Punycode.php.
const Mso\IdnaConvert\Punycode::punycodePrefix = 'xn--' |
Definition at line 36 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\getPunycodePrefix().
const Mso\IdnaConvert\Punycode::sBase = 0xAC00 |
Definition at line 46 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\hangulCompose().
const Mso\IdnaConvert\Punycode::sCount = 11172 |
Definition at line 54 of file Punycode.php.
const Mso\IdnaConvert\Punycode::skew = 38 |
Definition at line 42 of file Punycode.php.
const Mso\IdnaConvert\Punycode::sLast = self::sBase + self::lCount * self::vCount * self::tCount |
Definition at line 55 of file Punycode.php.
const Mso\IdnaConvert\Punycode::tBase = 0x11A7 |
Definition at line 49 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\hangulCompose().
const Mso\IdnaConvert\Punycode::tCount = 28 |
Definition at line 52 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\hangulCompose(), and Mso\IdnaConvert\Punycode\hangulDecompose().
const Mso\IdnaConvert\Punycode::tMax = 26 |
Definition at line 41 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\decode(), and Mso\IdnaConvert\Punycode\encode().
const Mso\IdnaConvert\Punycode::tMin = 1 |
Definition at line 40 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\adapt().
const Mso\IdnaConvert\Punycode::vBase = 0x1161 |
Definition at line 48 of file Punycode.php.
Referenced by Mso\IdnaConvert\Punycode\hangulCompose().
const Mso\IdnaConvert\Punycode::vCount = 21 |
Definition at line 51 of file Punycode.php.