Joomla CMS  2.5.24 (avec JPlatform 11.4 inclus)
Documentation des API du CMS Joomla en version 2.5 et du framework Joomla Platform intégré
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe idna_convert
+ Graphe d'héritage de idna_convert:

Liste de tous les membres

Fonctions membres publiques

 idna_convert ($options=false)
 set_parameter ($option, $value=false)
 decode ($input, $one_time_encoding=false)
 encode ($decoded, $one_time_encoding=false)
 get_last_error ()
 _decode ($encoded)
 _encode ($decoded)
 _adapt ($delta, $npoints, $is_first)
 _encode_digit ($d)
 _decode_digit ($cp)
 _error ($error= '')
 _nameprep ($input)
 _hangul_decompose ($char)
 _hangul_compose ($input)
 _get_combining_class ($char)
 _apply_cannonical_ordering ($input)
 _combine ($input)
 _utf8_to_ucs4 ($input)
 _ucs4_to_utf8 ($input)
 _ucs4_to_ucs4_string ($input)
 _ucs4_string_to_ucs4 ($input)

Attributs publics

 $NP = array()
 $_punycode_prefix = 'xn--'
 $_invalid_ucs = 0x80000000
 $_max_ucs = 0x10FFFF
 $_base = 36
 $_tmin = 1
 $_tmax = 26
 $_skew = 38
 $_damp = 700
 $_initial_bias = 72
 $_initial_n = 0x80
 $_sbase = 0xAC00
 $_lbase = 0x1100
 $_vbase = 0x1161
 $_tbase = 0x11A7
 $_lcount = 19
 $_vcount = 21
 $_tcount = 28
 $_ncount = 588
 $_scount = 11172
 $_error = false
 $_api_encoding = 'utf8'
 $_allow_overlong = false
 $_strict_mode = false

Description détaillée

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.

Auteur:
Matthias Sommerfeld mso@p.nosp@m.hlyl.nosp@m.abs.d.nosp@m.e
Version:
0.5.1

Documentation des fonctions membres

idna_convert::_adapt (   $delta,
  $npoints,
  $is_first 
)

Adapt the bias according to the current code point and position private

Références $_base, et $_tmin.

Référencé par _decode(), et _encode().

+ Voici le graphe des appelants de cette fonction :

idna_convert::_apply_cannonical_ordering (   $input)

Apllies the cannonical ordering of a decomposed UCS4 sequence

Paramètres:
arrayDecomposed UCS4 sequence
Renvoie:
array Ordered USC4 sequence private

Références $i, et _get_combining_class().

Référencé par _nameprep().

+ Voici le graphe d'appel pour cette fonction :

+ Voici le graphe des appelants de cette fonction :

idna_convert::_combine (   $input)

Do composition of a sequence of starter and non-starter

Paramètres:
arrayUCS4 Decomposed sequence
Renvoie:
array Ordered USC4 sequence private

Référencé par _nameprep().

+ Voici le graphe des appelants de cette fonction :

idna_convert::_decode (   $encoded)

The actual decoding algorithm private

Références $_base, $_initial_bias, $_initial_n, $i, _adapt(), _decode_digit(), _error(), et _ucs4_to_utf8().

Référencé par decode().

+ Voici le graphe d'appel pour cette fonction :

+ Voici le graphe des appelants de cette fonction :

idna_convert::_decode_digit (   $cp)

Decode a certain digit private

Références $_base.

Référencé par _decode().

+ Voici le graphe des appelants de cette fonction :

idna_convert::_encode (   $decoded)

The actual encoding algorithm private

Références $_base, $_initial_bias, $_initial_n, $i, _adapt(), _encode_digit(), _error(), _nameprep(), _utf8_to_ucs4(), et elseif.

Référencé par encode().

+ Voici le graphe d'appel pour cette fonction :

+ Voici le graphe des appelants de cette fonction :

idna_convert::_encode_digit (   $d)

Encoding a certain digit private

Référencé par _encode().

+ Voici le graphe des appelants de cette fonction :

idna_convert::_error (   $error = '')

Internal error handling method private

Référencé par _decode(), _encode(), _nameprep(), _ucs4_string_to_ucs4(), _ucs4_to_utf8(), _utf8_to_ucs4(), decode(), encode(), et set_parameter().

+ Voici le graphe des appelants de cette fonction :

idna_convert::_get_combining_class (   $char)

Returns the combining class of a certain wide char

Paramètres:
integerWide char to check (32bit integer)
Renvoie:
integer Combining class if found, else 0 private

Référencé par _apply_cannonical_ordering(), et _nameprep().

+ Voici le graphe des appelants de cette fonction :

idna_convert::_hangul_compose (   $input)

Ccomposes a Hangul syllable (see http://www.unicode.org/unicode/reports/tr15/#Hangul

Paramètres:
arrayDecomposed UCS4 sequence
Renvoie:
array UCS4 sequence with syllables composed private

Références $_lbase, $_sbase, $_tbase, $_tcount, $_vbase, et $i.

Référencé par _nameprep().

+ Voici le graphe des appelants de cette fonction :

idna_convert::_hangul_decompose (   $char)

Decomposes a Hangul syllable (see http://www.unicode.org/unicode/reports/tr15/#Hangul

Paramètres:
integer32bit UCS4 code point
Renvoie:
array Either Hangul Syllable decomposed or original 32bit value as one value array private

Références $_tcount.

Référencé par _nameprep().

+ Voici le graphe des appelants de cette fonction :

idna_convert::_nameprep (   $input)

Do Nameprep according to RFC3491 and RFC3454

Paramètres:
arrayUnicode Characters
Renvoie:
string Unicode Characters, Nameprep'd private

Références $class, $i, $output, _apply_cannonical_ordering(), _combine(), _error(), _get_combining_class(), _hangul_compose(), _hangul_decompose(), et elseif.

Référencé par _encode().

+ Voici le graphe d'appel pour cette fonction :

+ Voici le graphe des appelants de cette fonction :

idna_convert::_ucs4_string_to_ucs4 (   $input)

Convert UCS-4 strin into UCS-4 garray

private

Références $i, $output, et _error().

Référencé par encode().

+ Voici le graphe d'appel pour cette fonction :

+ Voici le graphe des appelants de cette fonction :

idna_convert::_ucs4_to_ucs4_string (   $input)

Convert UCS-4 array into UCS-4 string

private

Références $output.

Référencé par decode().

+ Voici le graphe des appelants de cette fonction :

idna_convert::_ucs4_to_utf8 (   $input)

Convert UCS-4 string into UTF-8 string See _utf8_to_ucs4() for details private

Références $output, _error(), et elseif.

Référencé par _decode(), et encode().

+ Voici le graphe d'appel pour cette fonction :

+ Voici le graphe des appelants de cette fonction :

idna_convert::_utf8_to_ucs4 (   $input)

This converts an UTF-8 encoded string to its UCS-4 representation By talking about UCS-4 "strings" we mean arrays of 32bit integers representing each of the "chars". This is due to PHP not being able to handle strings with bit depth different from 8. This apllies to the reverse method _ucs4_to_utf8(), too. The following UTF-8 encodings are supported: bytes bits representation 1 7 0xxxxxxx 2 11 110xxxxx 10xxxxxx 3 16 1110xxxx 10xxxxxx 10xxxxxx 4 21 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx 5 26 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 6 31 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx Each x represents a bit that can be used to store character data. The five and six byte sequences are part of Annex D of ISO/IEC 10646-1:2000 private

Références $mode, $output, _error(), et elseif.

Référencé par _encode(), decode(), et encode().

+ Voici le graphe d'appel pour cette fonction :

+ Voici le graphe des appelants de cette fonction :

idna_convert::decode (   $input,
  $one_time_encoding = false 
)

Decode a given ACE domain name

Paramètres:
stringDomain name (ACE string) [
stringDesired output encoding, see set_parameter]
Renvoie:
string Decoded Domain name (UTF-8 or UCS-4) public

Références $return, _decode(), _error(), _ucs4_to_ucs4_string(), _utf8_to_ucs4(), et elseif.

+ Voici le graphe d'appel pour cette fonction :

idna_convert::encode (   $decoded,
  $one_time_encoding = false 
)

Encode a given UTF-8 domain name

Paramètres:
stringDomain name (UTF-8 or UCS-4) [
stringDesired input encoding, see set_parameter]
Renvoie:
string Encoded Domain name (ACE string) public

Références $output, _encode(), _error(), _ucs4_string_to_ucs4(), _ucs4_to_utf8(), et _utf8_to_ucs4().

+ Voici le graphe d'appel pour cette fonction :

idna_convert::get_last_error ( )

Use this method to get the last error ocurred

Paramètres:
void
Renvoie:
string The last error, that occured public

Références $_error.

idna_convert::idna_convert (   $options = false)

Références $_tcount, $options, et set_parameter().

+ Voici le graphe d'appel pour cette fonction :

idna_convert::set_parameter (   $option,
  $value = false 
)

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

Paramètres:
mixedParameter to set (string: single parameter; array of Parameter => Value pairs)
stringValue to use (if parameter 1 is a string)
Renvoie:
boolean true on success, false otherwise public

Références _error().

Référencé par idna_convert().

+ Voici le graphe d'appel pour cette fonction :

+ Voici le graphe des appelants de cette fonction :


Documentation des données membres

idna_convert::$_allow_overlong = false
idna_convert::$_api_encoding = 'utf8'
idna_convert::$_base = 36

Référencé par _adapt(), _decode(), _decode_digit(), et _encode().

idna_convert::$_damp = 700
idna_convert::$_error = false

Référencé par get_last_error().

idna_convert::$_initial_bias = 72

Référencé par _decode(), et _encode().

idna_convert::$_initial_n = 0x80

Référencé par _decode(), et _encode().

idna_convert::$_invalid_ucs = 0x80000000
idna_convert::$_lbase = 0x1100

Référencé par _hangul_compose().

idna_convert::$_lcount = 19
idna_convert::$_max_ucs = 0x10FFFF
idna_convert::$_ncount = 588
idna_convert::$_punycode_prefix = 'xn--'
idna_convert::$_sbase = 0xAC00

Référencé par _hangul_compose().

idna_convert::$_scount = 11172
idna_convert::$_skew = 38
idna_convert::$_strict_mode = false
idna_convert::$_tbase = 0x11A7

Référencé par _hangul_compose().

idna_convert::$_tcount = 28
idna_convert::$_tmax = 26
idna_convert::$_tmin = 1

Référencé par _adapt().

idna_convert::$_vbase = 0x1161

Référencé par _hangul_compose().

idna_convert::$_vcount = 21
idna_convert::$NP = array()

La documentation de cette classe a été générée à partir du fichier suivant :