WSComun  1.6.5
Web Services Comunes para PHP/GVHidra
Métodos públicos estáticos | Campos de datos | Atributos públicos estáticos
Referencia de la Clase WSCCharset

Métodos públicos estáticos

static error_handler ($errno, $errstr)
 
static parse_charset ($input)
 
static convert ($str, $from, $to=null)
 
static utf7_to_utf8 ($str)
 
static utf16_to_utf8 ($str)
 
static utf7imap_to_utf8 ($str)
 
static utf8_to_utf7imap ($str)
 
static detect ($string, $failover=null, $language= 'es_ES')
 
static clean ($input)
 

Campos de datos

const WSC_CHARSET = 'UTF-8'
 

Atributos públicos estáticos

static $aliases
 

Descripción detallada

Definición en la línea 8 del archivo WSCCharset.php.

Documentación de las funciones miembro

static clean (   $input)
static

Removes non-unicode characters from input.

Parámetros
mixed$inputString or array.
Devuelve
mixed String or array

Definición en la línea 643 del archivo WSCCharset.php.

static convert (   $str,
  $from,
  $to = null 
)
static

Convert a string from one charset to another. Uses mbstring and iconv functions if possible

Parámetros
string$strInput string
string$fromSuspected charset of the input string
string$toTarget charset to convert to; defaults to WSC_CHARSET
Devuelve
string Converted string

Definición en la línea 151 del archivo WSCCharset.php.

static detect (   $string,
  $failover = null,
  $language = 'es_ES' 
)
static

A method to guess character set of a string.

Parámetros
string$stringString
string$failoverDefault result for failover
string$languageUser language
Devuelve
string Charset name

Definición en la línea 563 del archivo WSCCharset.php.

static error_handler (   $errno,
  $errstr 
)
static

Catch an error and throw an exception.

Parámetros
int$errnoLevel of the error
string$errstrError message

Definición en la línea 52 del archivo WSCCharset.php.

static parse_charset (   $input)
static

Parse and validate charset name string (see #1485758). Sometimes charset string is malformed, there are also charset aliases but we need strict names for charset conversion (specially utf8 class)

Parámetros
string$inputInput charset name
Devuelve
string The validated charset name

Definición en la línea 65 del archivo WSCCharset.php.

static utf16_to_utf8 (   $str)
static

Converts string from UTF-16 to UTF-8 (helper for utf-7 to utf-8 conversion)

Parámetros
string$strInput string
Devuelve
string The converted string

Definición en la línea 322 del archivo WSCCharset.php.

static utf7_to_utf8 (   $str)
static

Converts string from standard UTF-7 (RFC 2152) to UTF-8.

Parámetros
string$strInput string (UTF-7)
Devuelve
string Converted string (UTF-8)

Definición en la línea 273 del archivo WSCCharset.php.

static utf7imap_to_utf8 (   $str)
static

Convert the data ($str) from RFC 2060's UTF-7 to UTF-8. If input data is invalid, return the original input string. RFC 2060 obviously intends the encoding to be unique (see point 5 in section 5.1.3), so we reject any non-canonical form, such as &ACY- (instead of &-) or &AMA-&AMA- (instead of &AMAAwA-).

Translated from C to PHP by Thomas Bruederli round.nosp@m.cube.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Parámetros
string$strInput string (UTF7-IMAP)
Devuelve
string Output string (UTF-8)

Definición en la línea 357 del archivo WSCCharset.php.

static utf8_to_utf7imap (   $str)
static

Convert the data ($str) from UTF-8 to RFC 2060's UTF-7. Unicode characters above U+FFFF are replaced by U+FFFE. If input data is invalid, return an empty string.

Translated from C to PHP by Thomas Bruederli round.nosp@m.cube.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Parámetros
string$strInput string (UTF-8)
Devuelve
string Output string (UTF7-IMAP)

Definición en la línea 450 del archivo WSCCharset.php.


La documentación para esta clase fue generada a partir del siguiente fichero: