Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Mbstring.php

function Mbstring::assertEncoding

4 calls to Mbstring::assertEncoding()
Mbstring::mb_internal_trim in vendor/symfony/polyfill-mbstring/Mbstring.php
Mbstring::mb_lcfirst in vendor/symfony/polyfill-mbstring/Mbstring.php
Mbstring::mb_str_pad in vendor/symfony/polyfill-mbstring/Mbstring.php
Mbstring::mb_ucfirst in vendor/symfony/polyfill-mbstring/Mbstring.php

File

vendor/symfony/polyfill-mbstring/Mbstring.php, line 1032

Class

Mbstring
Partial mbstring implementation in PHP, iconv based, UTF-8 centric.

Namespace

Symfony\Polyfill\Mbstring

Code

private static function assertEncoding(string $encoding, string $errorFormat) : void {
    try {
        $validEncoding = @self::mb_check_encoding('', $encoding);
    } catch (\ValueError $e) {
        throw new \ValueError(sprintf($errorFormat, $encoding));
    }
    // BC for PHP 7.3 and lower
    if (!$validEncoding) {
        throw new \ValueError(sprintf($errorFormat, $encoding));
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal