You are here

public static function Unicode::getStatus in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Utility/Unicode.php \Drupal\Component\Utility\Unicode::getStatus()

Gets the current status of unicode/multibyte support on this environment.

Return value

int The status of multibyte support. It can be one of:

2 calls to Unicode::getStatus()
system_requirements in core/modules/system/system.install
Implements hook_requirements().
unicode_requirements in core/includes/unicode.inc
Moves unicode_requirements() logic to system_requirements().

File

core/lib/Drupal/Component/Utility/Unicode.php, line 102

Class

Unicode
Provides Unicode-related conversions and operations.

Namespace

Drupal\Component\Utility

Code

public static function getStatus() {
  switch (static::check()) {
    case 'mb_strlen':
      return Unicode::STATUS_SINGLEBYTE;
    case '':
      return Unicode::STATUS_MULTIBYTE;
  }
  return Unicode::STATUS_ERROR;
}