當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。