当前位置: 首页>>代码示例>>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;未经允许,请勿转载。