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

Ensures inputs are well formed UTF-8 When not, assumes Windows-1252 and converts to UTF-8 Tests only values, not keys
public static filterRequestInputs ( integer $normalization_form = 4, string $leading_combining = '◌' )
$normalization_form integer
$leading_combining string
Пример #1
0
 /**
  * check for UTF8-Support
  */
 public static function checkForSupport()
 {
     if (!isset(self::$support['mbstring'])) {
         self::$support['mbstring'] = self::mbstring_loaded();
         self::$support['iconv'] = self::iconv_loaded();
         self::$support['intl'] = self::intl_loaded();
         self::$support['pcre_utf8'] = self::pcre_utf8_support();
         Bootup::initAll();
         // Enables the portablity layer and configures PHP for UTF-8
         Bootup::filterRequestUri();
         // Redirects to an UTF-8 encoded URL if it's not already the case
         Bootup::filterRequestInputs();
         // Normalizes HTTP inputs to UTF-8 NFC
     }
 }
Пример #2
0
<?php

use voku\helper\Bootup;
if (defined('PORTABLE_UTF8__DISABLE_AUTO_FILTER') === false) {
    Bootup::initAll();
    // Enables the portability layer and configures PHP for UTF-8
    Bootup::filterRequestUri();
    // Redirects to an UTF-8 encoded URL if it's not already the case
    Bootup::filterRequestInputs();
    // Normalizes HTTP inputs to UTF-8 NFC
}