Habari\MultiByte::library PHP Метод

library() публичный статический Метод

Sets and returns the multibyte library being used internally
public static library ( integer $new_library = null ) : mixed
$new_library integer The new library to use. One of the self::USE_* constants, null to simply return, or false to disable and use native non-multibyte-safe PHP methods.
Результат mixed If $new_library is null, returns the current library being used. If $new_library has a valid value, returns the old library, else returns false.
    public static function library($new_library = null)
    {
        if ($new_library === null) {
            return self::$use_library;
        } elseif ($new_library === self::USE_MBSTRING) {
            $old_library = self::$use_library;
            self::$use_library = $new_library;
            return $old_library;
        } elseif ($new_library === false) {
            $old_library = self::$use_library;
            self::$use_library = $new_library;
            return $old_library;
        } else {
            return false;
        }
    }