You are here

public static function Unicode::setStatus in Service Container 7.2

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

Sets the value for multibyte support status for the current environment.

The following status keys are supported:

Parameters

int $status: The new status of multibyte support.

File

lib/Drupal/Component/Utility/Unicode.php, line 132
Contains \Drupal\Component\Utility\Unicode.

Class

Unicode
Provides Unicode-related conversions and operations.

Namespace

Drupal\Component\Utility

Code

public static function setStatus($status) {
  if (!in_array($status, array(
    static::STATUS_SINGLEBYTE,
    static::STATUS_MULTIBYTE,
    static::STATUS_ERROR,
  ))) {
    throw new \InvalidArgumentException('Invalid status value for unicode support.');
  }
  static::$status = $status;
}