function PhpTransliteration::__construct

Same name in this branch
  1. 8.9.x core/lib/Drupal/Core/Transliteration/PhpTransliteration.php \Drupal\Core\Transliteration\PhpTransliteration::__construct()
Same name in other branches
  1. 9 core/lib/Drupal/Core/Transliteration/PhpTransliteration.php \Drupal\Core\Transliteration\PhpTransliteration::__construct()
  2. 9 core/lib/Drupal/Component/Transliteration/PhpTransliteration.php \Drupal\Component\Transliteration\PhpTransliteration::__construct()
  3. 10 core/lib/Drupal/Core/Transliteration/PhpTransliteration.php \Drupal\Core\Transliteration\PhpTransliteration::__construct()
  4. 10 core/lib/Drupal/Component/Transliteration/PhpTransliteration.php \Drupal\Component\Transliteration\PhpTransliteration::__construct()
  5. 11.x core/lib/Drupal/Core/Transliteration/PhpTransliteration.php \Drupal\Core\Transliteration\PhpTransliteration::__construct()
  6. 11.x core/lib/Drupal/Component/Transliteration/PhpTransliteration.php \Drupal\Component\Transliteration\PhpTransliteration::__construct()

Constructs a transliteration object.

Parameters

string $data_directory: (optional) The directory where data files reside. If omitted, defaults to subdirectory 'data' underneath the directory where the class's PHP file resides.

1 call to PhpTransliteration::__construct()
PhpTransliteration::__construct in core/lib/Drupal/Core/Transliteration/PhpTransliteration.php
Constructs a PhpTransliteration object.
1 method overrides PhpTransliteration::__construct()
PhpTransliteration::__construct in core/lib/Drupal/Core/Transliteration/PhpTransliteration.php
Constructs a PhpTransliteration object.

File

core/lib/Drupal/Component/Transliteration/PhpTransliteration.php, line 84

Class

PhpTransliteration
Implements transliteration without using the PECL extensions.

Namespace

Drupal\Component\Transliteration

Code

public function __construct($data_directory = NULL) {
    $this->dataDirectory = isset($data_directory) ? $data_directory : __DIR__ . '/data';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.