class PHPTransliteration

Same name in this branch
  1. 9.x drupal/core/lib/Drupal/Component/Transliteration/PHPTransliteration.php \Drupal\Component\Transliteration\PHPTransliteration
  2. 9.x drupal/core/lib/Drupal/Core/Transliteration/PHPTransliteration.php \Drupal\Core\Transliteration\PHPTransliteration

Enhances PHPTransliteration with an alter hook.

Hierarchy

Expanded class hierarchy of PHPTransliteration

Related topics

1 file declares its use of PHPTransliteration
TransliterationTest.php in drupal/core/modules/system/lib/Drupal/system/Tests/Transliteration/TransliterationTest.php
Definition of Drupal\system\Tests\Transliteration\TransliterationTest.

File

drupal/core/lib/Drupal/Core/Transliteration/PHPTransliteration.php, line 17
Contains \Drupal\Core\Transliteration\PHPTransliteration.

Namespace

Drupal\Core\Transliteration
View source
class PHPTransliteration extends BaseTransliteration {

  /**
   * Overrides \Drupal\Component\Transliteration\PHPTransliteration::readLanguageOverrides().
   *
   * Allows modules to alter the language-specific $overrides array by invoking
   * hook_transliteration_overrides_alter().
   */
  protected function readLanguageOverrides($langcode) {
    parent::readLanguageOverrides($langcode);

    // Let modules alter the language-specific overrides.
    drupal_alter('transliteration_overrides', $this->languageOverrides[$langcode], $langcode);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PHPTransliteration::$dataDirectory protected property Directory where data for transliteration resides.
PHPTransliteration::$genericMap protected property Non-language-specific transliteration tables.
PHPTransliteration::$languageOverrides protected property Associative array of language-specific character transliteration tables.
PHPTransliteration::ordUTF8 protected static function Finds the character code for a UTF-8 character: like ord() but for UTF-8.
PHPTransliteration::readGenericData protected function Reads in generic transliteration data for a bank of characters.
PHPTransliteration::readLanguageOverrides protected function Overrides \Drupal\Component\Transliteration\PHPTransliteration::readLanguageOverrides(). Overrides PHPTransliteration::readLanguageOverrides
PHPTransliteration::replace protected function Replaces a single Unicode character using the transliteration database.
PHPTransliteration::transliterate public function Implements TransliterationInterface::transliterate(). Overrides TransliterationInterface::transliterate
PHPTransliteration::__construct public function Constructs a transliteration object.