本文整理匯總了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();
}
示例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();
}