Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Unknown

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class idna_convert

Description

Encode/decode Internationalized Domain Names.

The class allows to convert internationalized domain names (see RFC 3490 for details) as they can be used with various registries worldwide to be translated between their original (localized) form and their encoded form as it will be used in the DNS (Domain Name System).

The class provides two public methods, encode() and decode(), which do exactly what you would expect them to do. You are allowed to use complete domain names, simple strings and complete email addresses as well. That means, that you might use any of the following notations:

  • www.nörgler.com
  • xn--nrgler-wxa
  • xn--brse-5qa.xn--knrz-1ra.info
Unicode input might be given as either UTF-8 string, UCS-4 string or UCS-4 array. Unicode output is available in the same formats. You can select your preferred format via set_paramter().

ACE input and output is always expected to be ASCII.

Located in /simplepie/idn/idna_convert.class.php (line 61)

Class idna_convert
Direct descendents
Class Description
ClassNet_IDNA_php4 Adapter class for aligning the API of idna_convert with that of
Variable Summary
Variable mixed $_base
Variable mixed $_damp
Variable mixed $_error
Variable mixed $_initial_n
Variable mixed $_lbase
Variable mixed $_lcount
Variable mixed $_max_ucs
Variable mixed $_ncount
Variable mixed $_sbase
Variable mixed $_scount
Variable mixed $_skew
Variable mixed $_tbase
Variable mixed $_tcount
Variable mixed $_tmax
Variable mixed $_tmin
Variable mixed $_vbase
Variable mixed $_vcount
Method Summary
Constructor idna_convert idna_convert ([ $options = false])
Method string decode (string $input, [ $one_time_encoding = false])
Method string encode (string $decoded, [ $one_time_encoding = false])
Method string get_last_error (void 0)
Method boolean set_parameter (mixed $option, [string $value = false])
Variables
mixed $_allow_overlong = false (line 100)
mixed $_api_encoding = 'utf8' (line 99)
mixed $_base = 36 (line 79)
mixed $_damp = 700 (line 83)
mixed $_error = false (line 95)
mixed $_initial_bias = 72 (line 84)
mixed $_initial_n = 0x80 (line 85)
mixed $_invalid_ucs = 0x80000000 (line 77)
mixed $_lbase = 0x1100 (line 87)
mixed $_lcount = 19 (line 90)
mixed $_max_ucs = 0x10FFFF (line 78)
mixed $_ncount = 588 (line 93)
mixed $_punycode_prefix = 'xn--' (line 76)
mixed $_sbase = 0xAC00 (line 86)
mixed $_scount = 11172 (line 94)
mixed $_skew = 38 (line 82)
mixed $_strict_mode = false (line 101)
mixed $_tbase = 0x11a7 (line 89)
mixed $_tcount = 28 (line 92)
mixed $_tmax = 26 (line 81)
mixed $_tmin = 1 (line 80)
mixed $_vbase = 0x1161 (line 88)
mixed $_vcount = 21 (line 91)
Methods
Constructor idna_convert (line 104)
idna_convert idna_convert ([ $options = false])
  • $options
decode (line 175)

Decode a given ACE domain name

  • return: Decoded Domain name (UTF-8 or UCS-4)
  • access: public
string decode (string $input, [ $one_time_encoding = false])
  • string $input: Domain name (ACE string) [@param string Desired output encoding, see set_parameter]
  • $one_time_encoding
encode (line 265)

Encode a given UTF-8 domain name

  • return: Encoded Domain name (ACE string)
  • access: public
string encode (string $decoded, [ $one_time_encoding = false])
  • string $decoded: Domain name (UTF-8 or UCS-4) [@param string Desired input encoding, see set_parameter]
  • $one_time_encoding
get_last_error (line 352)

Use this method to get the last error ocurred

  • return: The last error, that occured
  • access: public
string get_last_error (void 0)
  • void 0
set_parameter (line 135)

Sets a new option value. Available options and values:

[encoding - Use either UTF-8, UCS4 as array or UCS4 as string as input ('utf8' for UTF-8, 'ucs4_string' and 'ucs4_array' respectively for UCS4); The output is always UTF-8] [overlong - Unicode does not allow unnecessarily long encodings of chars, to allow this, set this parameter to true, else to false; default is false.] [strict - true: strict mode, good for registration purposes - Causes errors on failures; false: loose mode, ideal for "wildlife" applications by silently ignoring errors and returning the original input instead

  • return: true on success, false otherwise
  • access: public
boolean set_parameter (mixed $option, [string $value = false])
  • mixed $option: Parameter to set (string: single parameter; array of Parameter => Value pairs)
  • string $value: Value to use (if parameter 1 is a string)

Documentation generated on Mon, 05 Mar 2007 21:07:31 +0000 by phpDocumentor 1.3.1