当前位置: 首页>>代码示例>>PHP>>正文


PHP Bootup::filterRequestUri方法代码示例

本文整理汇总了PHP中Patchwork\Utf8\Bootup::filterRequestUri方法的典型用法代码示例。如果您正苦于以下问题:PHP Bootup::filterRequestUri方法的具体用法?PHP Bootup::filterRequestUri怎么用?PHP Bootup::filterRequestUri使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Patchwork\Utf8\Bootup的用法示例。


在下文中一共展示了Bootup::filterRequestUri方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initializeClasses

 /**
  * @inheritdoc
  */
 public function initializeClasses(SymfonyRequest $symfonyRequest)
 {
     Utf8\Bootup::initAll();
     // Enables the portability layer and configures PHP for UTF-8
     Utf8\Bootup::filterRequestUri();
     // Redirects to an UTF-8 encoded URL if it's not already the case
     Utf8\Bootup::filterRequestInputs();
     // Normalizes HTTP inputs to UTF-8 NFC
     $file = $this->appPath->getCacheDir() . 'container.php';
     $this->dumpContainer($symfonyRequest, $file);
     require_once $file;
     $this->container = new \ACP3ServiceContainer();
     $this->container->set('core.environment.application_path', $this->appPath);
     $this->container->set('core.http.symfony_request', $symfonyRequest);
 }
开发者ID:acp3,项目名称:core,代码行数:18,代码来源:Bootstrap.php

示例2: __construct

 /**
  * Application constructor.
  *
  * @param object $loader The autoloader instance.
  * @param array $config The custom configuration of the application.
  * @param string $appPath The application absolute path.
  * @param array $classesMap The custom classes map of the application.
  */
 public function __construct($loader, array $config = [], $appPath = null, array $classesMap = [])
 {
     # Utilities
     $this->utilities = new Utilities($this);
     # Register start time
     $this->utilities->registerStartTime();
     # Store application path
     $this->utilities->setApplicationPath($appPath);
     # Store classes map
     $this['class'] = $this->utilities->setClassesMap($classesMap);
     # Call container constructor
     parent::__construct($this->utilities->setConfiguration($config));
     # Register core services providers
     $this->register(new FilesystemServiceProvider());
     $this->register(new FinderServiceProvider());
     $this->register(new HttpServiceProvider());
     $this->register(new LoggerServiceProvider());
     $this->register(new MessagesServiceProvider());
     $this->register(new RouterServiceProvider());
     $this->register(new SupportServiceProvider());
     $this->register(new TemplatingServiceProvider());
     $this->register(new TriggersServiceProvider());
     # Enables the portablity layer and configures PHP for UTF-8
     Utf8Bootup::initAll();
     # Redirects to an UTF-8 encoded URL if it's not already the case
     Utf8Bootup::filterRequestUri();
     # Normalizes HTTP inputs to UTF-8 NFC
     Utf8Bootup::filterRequestInputs();
     # Print errors in debug mode
     if ($this['debug']) {
         $whoops = new WhoopsRun();
         $whoops->pushHandler(new WhoopsHandler());
         $whoops->register();
     } else {
         ErrorHandler::register($this['phpLogger']);
     }
     # Only enable Kint in debug mode
     \Kint::enabled($this['debug']);
 }
开发者ID:forxer,项目名称:tao,代码行数:47,代码来源:Application.php

示例3: date_default_timezone_set

    date_default_timezone_set(@date_default_timezone_get());
}
// Emulate PHP 5.4 feature that allows us to create/use an object without a temporary.
// PHP 5.4: (new X)->y()
// PHP 5.3: with(new X)->y()
function with($x)
{
    return $x;
}
// Use the patchwork/utf8 library to:
// 1) set all PHP defaults to UTF-8
// 2) create shims for missing mb_string functions such as mb_strlen()
// 3) check that requests are valid UTF-8
\Patchwork\Utf8\Bootup::initAll();
// Enables the portablity layer and configures PHP for UTF-8
\Patchwork\Utf8\Bootup::filterRequestUri();
// Redirects to an UTF-8 encoded URL if it's not already the case
\Patchwork\Utf8\Bootup::filterRequestInputs();
// Normalizes HTTP inputs to UTF-8 NFC
// Use the fisharebest/ext-calendar library to
// 1) provide shims for the PHP ext/calendar extension, such as JewishToJD()
// 2) provide calendar conversions for the Arabic and Persian calendars
\Fisharebest\ExtCalendar\Shim::create();
// Split the request protocol://host:port/path/to/script.php?var=value into parts
// WT_SERVER_NAME  = protocol://host:port
// WT_SCRIPT_PATH  = /path/to/   (begins and ends with /)
// WT_SCRIPT_NAME  = script.php  (already defined in the calling script)
$https = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';
define('WT_SERVER_NAME', ($https ? 'https://' : 'http://') . (empty($_SERVER['SERVER_NAME']) ? '' : $_SERVER['SERVER_NAME']) . (empty($_SERVER['SERVER_PORT']) || !$https && $_SERVER['SERVER_PORT'] == 80 || $https && $_SERVER['SERVER_PORT'] == 443 ? '' : ':' . $_SERVER['SERVER_PORT']));
// REDIRECT_URL should be set in the case of Apache following a RedirectRule
// SCRIPT_NAME should always be correct, but is not always present.
开发者ID:brambravo,项目名称:webtrees,代码行数:31,代码来源:session.php


注:本文中的Patchwork\Utf8\Bootup::filterRequestUri方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。