PHP Class JpnForPhp\Transliterator\Romaji

Author: Matthieu Bilbille (@mbibille)
Inheritance: extends TransliterationSystem
Afficher le fichier Open project: mbilbille/jpnforphp

Méthodes publiques

Méthode Description
__construct ( $system = '' ) Romaji's constructor
__toString ( ) Implements __toString().

Méthodes protégées

Méthode Description
postTransliterate ( $str ) Override postTransliterate().
preTransliterate ( $str ) Override preTransliterate().
transliterateChoonpu ( string $str, array $parameters ) : string Transliterate Chōonpu (http://en.wikipedia.org/wiki/Chōonpu) character into its equivalent in latin alphabet.
transliterateDefaultCharacters ( string $str, array $parameters ) : string Use the specified mapping to transliterate the given string into romaji
transliterateLongVowels ( string $str, array $parameters ) : string Transliterate long vowels as per the given mapping.
transliterateNBeforeLabialConsonants ( string $str ) : string Transliterate character 'n' to 'm' before labial consonants.
transliterateParticles ( string $str, array $parameters ) : string Transliterate particules as per the given mapping.
transliterateSokuon ( string $str, array $parameters ) : string Transliterate Sokuon (http://en.wikipedia.org/wiki/Sokuon) character into its equivalent in latin alphabet.

Private Methods

Méthode Description
escapeLatinCharacters ( $str ) Escapes latin characters [a-z].
espaceLatinCharactersCallback ( $matches ) Private callback for escapeLatinCharacters().
unescapeLatinCharacters ( $str ) Unescapes latin characters [a-z].

Method Details

__construct() public méthode

Romaji's constructor
public __construct ( $system = '' )

__toString() public méthode

Implements __toString().
See also: TransliterationSystem
public __toString ( )

postTransliterate() protected méthode

Override postTransliterate().
See also: TransliterationSystem
protected postTransliterate ( $str )

preTransliterate() protected méthode

Override preTransliterate().
See also: TransliterationSystem
protected preTransliterate ( $str )

transliterateChoonpu() protected méthode

Transliterate Chōonpu (http://en.wikipedia.org/wiki/Chōonpu) character into its equivalent in latin alphabet.
protected transliterateChoonpu ( string $str, array $parameters ) : string
$str string String to be transliterated.
$parameters array Macrons mapping.
Résultat string Transliterated string.

transliterateDefaultCharacters() protected méthode

Use the specified mapping to transliterate the given string into romaji
protected transliterateDefaultCharacters ( string $str, array $parameters ) : string
$str string String to be converted.
$parameters array Characters mapping.
Résultat string Converted string.

transliterateLongVowels() protected méthode

Transliterate long vowels as per the given mapping.
protected transliterateLongVowels ( string $str, array $parameters ) : string
$str string String to be transliterated.
$parameters array Long vowels mapping.
Résultat string Transliterated string.

transliterateNBeforeLabialConsonants() protected méthode

Transliterate character 'n' to 'm' before labial consonants.
protected transliterateNBeforeLabialConsonants ( string $str ) : string
$str string String to be transliterated.
Résultat string Transliterated string.

transliterateParticles() protected méthode

Transliterate particules as per the given mapping.
protected transliterateParticles ( string $str, array $parameters ) : string
$str string String to be transliterated.
$parameters array Particules mapping.
Résultat string Transliterated string.

transliterateSokuon() protected méthode

Transliterate Sokuon (http://en.wikipedia.org/wiki/Sokuon) character into its equivalent in latin alphabet.
protected transliterateSokuon ( string $str, array $parameters ) : string
$str string String to be transliterated.
$parameters array Default or Hepburn transliteration.
Résultat string Transliterated string.