public static function Unicode::setStatus in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/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:
- \Drupal\Component\Utility\Unicode::STATUS_MULTIBYTE Full unicode support using an extension.
- \Drupal\Component\Utility\Unicode::STATUS_SINGLEBYTE Standard PHP (emulated) unicode support.
- \Drupal\Component\Utility\Unicode::STATUS_ERROR An error occurred. No unicode support.
Parameters
int $status: The new status of multibyte support.
8 calls to Unicode::setStatus()
- UnicodeTest::testLcfirst in core/
tests/ Drupal/ Tests/ Component/ Utility/ UnicodeTest.php - Tests multibyte lcfirst.
- UnicodeTest::testStatus in core/
tests/ Drupal/ Tests/ Component/ Utility/ UnicodeTest.php - Getting and settings the multibyte environment status.
- UnicodeTest::testStrlen in core/
tests/ Drupal/ Tests/ Component/ Utility/ UnicodeTest.php - Tests multibyte strlen.
- UnicodeTest::testStrpos in core/
tests/ Drupal/ Tests/ Component/ Utility/ UnicodeTest.php - Tests multibyte strpos.
- UnicodeTest::testStrtolower in core/
tests/ Drupal/ Tests/ Component/ Utility/ UnicodeTest.php - Tests multibyte strtolower.
File
- core/
lib/ Drupal/ Component/ Utility/ Unicode.php, line 132 - Contains \Drupal\Component\Utility\Unicode.
Class
- Unicode
- Provides Unicode-related conversions and operations.
Namespace
Drupal\Component\UtilityCode
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;
}