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


PHP WebRequest::getFuzzyBool方法代码示例

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


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

示例1: __construct

 /**
  * @param ResourceLoader $resourceLoader
  * @param WebRequest $request
  */
 public function __construct(ResourceLoader $resourceLoader, WebRequest $request)
 {
     $this->resourceLoader = $resourceLoader;
     $this->request = $request;
     // Interpret request
     // List of modules
     $modules = $request->getVal('modules');
     $this->modules = $modules ? self::expandModuleNames($modules) : array();
     // Various parameters
     $this->skin = $request->getVal('skin');
     $this->user = $request->getVal('user');
     $this->debug = $request->getFuzzyBool('debug', $resourceLoader->getConfig()->get('ResourceLoaderDebug'));
     $this->only = $request->getVal('only');
     $this->version = $request->getVal('version');
     $this->raw = $request->getFuzzyBool('raw');
     // Image requests
     $this->image = $request->getVal('image');
     $this->variant = $request->getVal('variant');
     $this->format = $request->getVal('format');
     $skinnames = Skin::getSkinNames();
     // If no skin is specified, or we don't recognize the skin, use the default skin
     if (!$this->skin || !isset($skinnames[$this->skin])) {
         $this->skin = $resourceLoader->getConfig()->get('DefaultSkin');
     }
 }
开发者ID:eliagbayani,项目名称:LiteratureEditor,代码行数:29,代码来源:ResourceLoaderContext.php

示例2: __construct

 /**
  * @param ResourceLoader $resourceLoader
  * @param WebRequest $request
  */
 public function __construct(ResourceLoader $resourceLoader, WebRequest $request)
 {
     $this->resourceLoader = $resourceLoader;
     $this->request = $request;
     $this->logger = $resourceLoader->getLogger();
     // Future developers: Avoid use of getVal() in this class, which performs
     // expensive UTF normalisation by default. Use getRawVal() instead.
     // Values here are either one of a finite number of internal IDs,
     // or previously-stored user input (e.g. titles, user names) that were passed
     // to this endpoint by ResourceLoader itself from the canonical value.
     // Values do not come directly from user input and need not match.
     // List of modules
     $modules = $request->getRawVal('modules');
     $this->modules = $modules ? self::expandModuleNames($modules) : [];
     // Various parameters
     $this->user = $request->getRawVal('user');
     $this->debug = $request->getFuzzyBool('debug', $resourceLoader->getConfig()->get('ResourceLoaderDebug'));
     $this->only = $request->getRawVal('only', null);
     $this->version = $request->getRawVal('version', null);
     $this->raw = $request->getFuzzyBool('raw');
     // Image requests
     $this->image = $request->getRawVal('image');
     $this->variant = $request->getRawVal('variant');
     $this->format = $request->getRawVal('format');
     $this->skin = $request->getRawVal('skin');
     $skinnames = Skin::getSkinNames();
     // If no skin is specified, or we don't recognize the skin, use the default skin
     if (!$this->skin || !isset($skinnames[$this->skin])) {
         $this->skin = $resourceLoader->getConfig()->get('DefaultSkin');
     }
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:35,代码来源:ResourceLoaderContext.php

示例3: __construct

 /**
  * @param $resourceLoader ResourceLoader
  * @param $request WebRequest
  */
 public function __construct($resourceLoader, WebRequest $request)
 {
     global $wgDefaultSkin, $wgResourceLoaderDebug;
     $this->resourceLoader = $resourceLoader;
     $this->request = $request;
     // Interpret request
     // List of modules
     $modules = $request->getVal('modules');
     $this->modules = $modules ? self::expandModuleNames($modules) : array();
     // Various parameters
     $this->skin = $request->getVal('skin');
     $this->user = $request->getVal('user');
     $this->debug = $request->getFuzzyBool('debug', $wgResourceLoaderDebug);
     $this->only = $request->getVal('only');
     $this->version = $request->getVal('version');
     // Wikia - change begin - @author: wladek
     $this->sassParams = array();
     foreach ($request->getValues() as $key => $value) {
         if (startsWith($key, 'sass_')) {
             $this->sassParams[substr($key, strlen('sass_'))] = $value;
         }
     }
     ksort($this->sassParams);
     // Wikia - change end
     $skinnames = Skin::getSkinNames();
     // If no skin is specified, or we don't recognize the skin, use the default skin
     if (!$this->skin || !isset($skinnames[$this->skin])) {
         $this->skin = $wgDefaultSkin;
     }
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:34,代码来源:ResourceLoaderContext.php

示例4: __construct

 /**
  * @param $resourceLoader ResourceLoader
  * @param $request WebRequest
  */
 public function __construct($resourceLoader, WebRequest $request)
 {
     global $wgDefaultSkin, $wgResourceLoaderDebug;
     $this->resourceLoader = $resourceLoader;
     $this->request = $request;
     // Interpret request
     // List of modules
     $modules = $request->getVal('modules');
     $this->modules = $modules ? self::expandModuleNames($modules) : array();
     // Various parameters
     $this->skin = $request->getVal('skin');
     $this->user = $request->getVal('user');
     $this->debug = $request->getFuzzyBool('debug', $wgResourceLoaderDebug);
     $this->only = $request->getVal('only');
     $this->version = $request->getVal('version');
     $this->raw = $request->getFuzzyBool('raw');
     $skinnames = Skin::getSkinNames();
     // If no skin is specified, or we don't recognize the skin, use the default skin
     if (!$this->skin || !isset($skinnames[$this->skin])) {
         $this->skin = $wgDefaultSkin;
     }
 }
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:26,代码来源:ResourceLoaderContext.php

示例5: __construct

 public function __construct(ResourceLoader $resourceLoader, WebRequest $request)
 {
     global $wgDefaultSkin, $wgResourceLoaderDebug;
     $this->resourceLoader = $resourceLoader;
     $this->request = $request;
     // Interpret request
     // List of modules
     $modules = $request->getVal('modules');
     $this->modules = $modules ? self::expandModuleNames($modules) : array();
     // Various parameters
     $this->skin = $request->getVal('skin');
     $this->user = $request->getVal('user');
     $this->debug = $request->getFuzzyBool('debug', $wgResourceLoaderDebug);
     $this->only = $request->getVal('only');
     $this->version = $request->getVal('version');
     if (!$this->skin) {
         $this->skin = $wgDefaultSkin;
     }
 }
开发者ID:GodelDesign,项目名称:Godel,代码行数:19,代码来源:ResourceLoaderContext.php


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