PHP 클래스 Phergie_Plugin_Encoding, phergie

저자: Phergie Development Team ([email protected])
상속: extends Phergie_Plugin_Abstract
파일 보기 프로젝트 열기: phergie/phergie

보호된 프로퍼티들

프로퍼티 타입 설명
$entities array Lookup table for entity conversions not supported by html_entity_decode()

공개 메소드들

메소드 설명
codeToUtf8 ( integer $code ) : string Converts a given unicode to its UTF-8 equivalent.
decodeEntities ( string $string, string $charset = 'UTF-8' ) : string Decodes markup entities in a given string.
transliterate ( string $string, string $charsetFrom = 'UTF-8', string $charsetTo = 'ISO-8859-1' ) : string Transliterates characters in a given string where possible.

메소드 상세

codeToUtf8() 공개 메소드

Converts a given unicode to its UTF-8 equivalent.
public codeToUtf8 ( integer $code ) : string
$code integer Code to convert
리턴 string Character corresponding to code

decodeEntities() 공개 메소드

Decodes markup entities in a given string.
public decodeEntities ( string $string, string $charset = 'UTF-8' ) : string
$string string String containing markup entities
$charset string Optional character set name to use in decoding entities, defaults to UTF-8
리턴 string String with markup entities decoded

transliterate() 공개 메소드

Transliterates characters in a given string where possible.
public transliterate ( string $string, string $charsetFrom = 'UTF-8', string $charsetTo = 'ISO-8859-1' ) : string
$string string String containing characters to transliterate
$charsetFrom string Optional character set of the string, defaults to UTF-8
$charsetTo string Optional character set to which the string should be converted, defaults to ISO-8859-1
리턴 string String with characters transliterated or the original string if transliteration was not possible

프로퍼티 상세

$entities 보호되어 있는 정적으로 프로퍼티

Lookup table for entity conversions not supported by html_entity_decode()
protected static array $entities
리턴 array