[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/Requests/ -> IDNAEncoder.php (summary)

(no description)

File Size: 388 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Requests_IDNAEncoder:: (8 methods):
  encode()
  to_ascii()
  is_ascii()
  nameprep()
  utf8_to_codepoints()
  punycode_encode()
  digit_to_char()
  adapt()


Class: Requests_IDNAEncoder  - X-Ref

IDNA URL encoder

Note: Not fully compliant, as nameprep does nothing yet.

encode($string)   X-Ref
Encode a hostname using Punycode

return: string Punycode-encoded hostname
param: string $string Hostname

to_ascii($string)   X-Ref
Convert a UTF-8 string to an ASCII string using Punycode

return: string ASCII string
param: string $string ASCII or UTF-8 string (max length 64 characters)

is_ascii($string)   X-Ref
Check whether a given string contains only ASCII characters

return: bool Is the string ASCII-only?
param: string $string

nameprep($string)   X-Ref
Prepare a string for use as an IDNA name

return: string Prepared string
param: string $string

utf8_to_codepoints($input)   X-Ref
Convert a UTF-8 string to a UCS-4 codepoint array

Based on Requests_IRI::replace_invalid_with_pct_encoding()

return: array Unicode code points
param: string $input

punycode_encode($input)   X-Ref
RFC3492-compliant encoder

return: string Punycode-encoded string
param: string $input UTF-8 encoded string to encode

digit_to_char($digit)   X-Ref
Convert a digit to its respective character

return: string Single character corresponding to digit
param: int $digit Digit in the range 0-35

adapt($delta, $numpoints, $firsttime)   X-Ref
Adapt the bias

return: int New bias
param: int $delta
param: int $numpoints
param: bool $firsttime



Generated: Fri Dec 6 01:00:03 2019 Cross-referenced by PHPXref 0.7.1