當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Input::hasUnusedGet方法代碼示例

本文整理匯總了PHP中Contao\Input::hasUnusedGet方法的典型用法代碼示例。如果您正苦於以下問題:PHP Input::hasUnusedGet方法的具體用法?PHP Input::hasUnusedGet怎麽用?PHP Input::hasUnusedGet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Contao\Input的用法示例。


在下文中一共展示了Input::hasUnusedGet方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: compile

 /**
  * Compile the template
  *
  * @param bool $blnCheckRequest If true, check for unsued $_GET parameters
  *
  * @throws \UnusedArgumentsException If there are unused $_GET parameters
  *
  * @internal Do not call this method in your code. It will be made private in Contao 5.0.
  */
 protected function compile($blnCheckRequest = false)
 {
     $this->keywords = '';
     $arrKeywords = array_map('trim', explode(',', $GLOBALS['TL_KEYWORDS']));
     // Add the meta keywords
     if (strlen($arrKeywords[0])) {
         $this->keywords = str_replace(array("\n", "\r", '"'), array(' ', '', ''), implode(', ', array_unique($arrKeywords)));
     }
     // Parse the template
     $this->strBuffer = $this->parse();
     // HOOK: add custom output filters
     if (isset($GLOBALS['TL_HOOKS']['outputFrontendTemplate']) && is_array($GLOBALS['TL_HOOKS']['outputFrontendTemplate'])) {
         foreach ($GLOBALS['TL_HOOKS']['outputFrontendTemplate'] as $callback) {
             $this->import($callback[0]);
             $this->strBuffer = $this->{$callback[0]}->{$callback[1]}($this->strBuffer, $this->strTemplate);
         }
     }
     // Add the output to the cache
     $this->addToCache();
     // Unset only after the output has been cached (see #7824)
     unset($_SESSION['LOGIN_ERROR']);
     // Replace insert tags and then re-replace the request_token tag in case a form element has been loaded via insert tag
     $this->strBuffer = $this->replaceInsertTags($this->strBuffer, false);
     $this->strBuffer = str_replace(array('{{request_token}}', '[{]', '[}]'), array(REQUEST_TOKEN, '{{', '}}'), $this->strBuffer);
     $this->strBuffer = $this->replaceDynamicScriptTags($this->strBuffer);
     // see #4203
     // HOOK: allow to modify the compiled markup (see #4291)
     if (isset($GLOBALS['TL_HOOKS']['modifyFrontendPage']) && is_array($GLOBALS['TL_HOOKS']['modifyFrontendPage'])) {
         foreach ($GLOBALS['TL_HOOKS']['modifyFrontendPage'] as $callback) {
             $this->import($callback[0]);
             $this->strBuffer = $this->{$callback[0]}->{$callback[1]}($this->strBuffer, $this->strTemplate);
         }
     }
     // Check whether all $_GET parameters have been used (see #4277)
     if ($blnCheckRequest && \Input::hasUnusedGet()) {
         throw new \UnusedArgumentsException();
     }
     parent::compile();
 }
開發者ID:Mozan,項目名稱:core-bundle,代碼行數:48,代碼來源:FrontendTemplate.php

示例2: compile

 /**
  * Compile the template
  *
  * @throws \UnusedArgumentsException If there are unused $_GET parameters
  *
  * @internal Do not call this method in your code. It will be made private in Contao 5.0.
  */
 protected function compile()
 {
     $this->keywords = '';
     $arrKeywords = \StringUtil::trimsplit(',', $GLOBALS['TL_KEYWORDS']);
     // Add the meta keywords
     if (strlen($arrKeywords[0])) {
         $this->keywords = str_replace(array("\n", "\r", '"'), array(' ', '', ''), implode(', ', array_unique($arrKeywords)));
     }
     // Parse the template
     $this->strBuffer = $this->parse();
     // HOOK: add custom output filters
     if (isset($GLOBALS['TL_HOOKS']['outputFrontendTemplate']) && is_array($GLOBALS['TL_HOOKS']['outputFrontendTemplate'])) {
         foreach ($GLOBALS['TL_HOOKS']['outputFrontendTemplate'] as $callback) {
             $this->import($callback[0]);
             $this->strBuffer = $this->{$callback[0]}->{$callback[1]}($this->strBuffer, $this->strTemplate);
         }
     }
     // Replace insert tags
     $this->strBuffer = $this->replaceInsertTags($this->strBuffer);
     $this->strBuffer = $this->replaceDynamicScriptTags($this->strBuffer);
     // see #4203
     // HOOK: allow to modify the compiled markup (see #4291)
     if (isset($GLOBALS['TL_HOOKS']['modifyFrontendPage']) && is_array($GLOBALS['TL_HOOKS']['modifyFrontendPage'])) {
         foreach ($GLOBALS['TL_HOOKS']['modifyFrontendPage'] as $callback) {
             $this->import($callback[0]);
             $this->strBuffer = $this->{$callback[0]}->{$callback[1]}($this->strBuffer, $this->strTemplate);
         }
     }
     // Check whether all $_GET parameters have been used (see #4277)
     if ($this->blnCheckRequest && \Input::hasUnusedGet()) {
         throw new \UnusedArgumentsException();
     }
     parent::compile();
 }
開發者ID:contao,項目名稱:core-bundle,代碼行數:41,代碼來源:FrontendTemplate.php


注:本文中的Contao\Input::hasUnusedGet方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。