for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace dokuwiki\Utf8;
/**
* Provides static access to the UTF-8 conversion tables
*
* Lazy-Loads tables on first access
*/
class Table
{
* Get the upper to lower case conversion table
* @return array
public static function upperCaseToLowerCase()
static $table = null;
if ($table === null) $table = include __DIR__ . '/tables/case.php';
return $table;
}
* Get the lower to upper case conversion table
public static function lowerCaseToUpperCase()
if ($table === null) {
$uclc = self::upperCaseToLowerCase();
$table = array_flip($uclc);
* Get the lower case accent table
public static function lowerAccents()
$table = include __DIR__ . '/tables/loweraccents.php';
public static function upperAccents()
$table = include __DIR__ . '/tables/upperaccents.php';
* Get the romanization table
public static function romanization()
$table = include __DIR__ . '/tables/romanization.php';
* Get the special chars as a concatenated string
* @return string
public static function specialChars()
static $string = null;
if ($string === null) {
$table = include __DIR__ . '/tables/specials.php';
// FIXME should we cache this to file system?
$string = Unicode::toUtf8($table);
return $string;