You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.1 KiB
PHTML
76 lines
2.1 KiB
PHTML
14 years ago
|
<?php
|
||
|
/**
|
||
|
* Smarty Internal Plugin Compile Nocache
|
||
13 years ago
|
* Compiles the {nocache} {/nocache} tags.
|
||
|
*
|
||
10 years ago
|
* @package Smarty
|
||
14 years ago
|
* @subpackage Compiler
|
||
10 years ago
|
* @author Uwe Tews
|
||
14 years ago
|
*/
|
||
|
|
||
|
/**
|
||
10 years ago
|
* Smarty Internal Plugin Compile Nocache Class
|
||
13 years ago
|
*
|
||
10 years ago
|
* @package Smarty
|
||
13 years ago
|
* @subpackage Compiler
|
||
|
*/
|
||
11 years ago
|
class Smarty_Internal_Compile_Nocache extends Smarty_Internal_CompileBase
|
||
|
{
|
||
9 years ago
|
/**
|
||
|
* Array of names of valid option flags
|
||
|
*
|
||
|
* @var array
|
||
|
*/
|
||
|
public $option_flags = array();
|
||
|
|
||
14 years ago
|
/**
|
||
|
* Compiles code for the {nocache} tag
|
||
13 years ago
|
* This tag does not generate compiled output. It only sets a compiler flag.
|
||
|
*
|
||
9 years ago
|
* @param array $args array with attributes from parser
|
||
|
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
|
||
10 years ago
|
*
|
||
13 years ago
|
* @return bool
|
||
14 years ago
|
*/
|
||
9 years ago
|
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
|
||
14 years ago
|
{
|
||
13 years ago
|
$_attr = $this->getAttributes($compiler, $args);
|
||
9 years ago
|
$this->openTag($compiler, 'nocache', array($compiler->nocache));
|
||
14 years ago
|
// enter nocache mode
|
||
13 years ago
|
$compiler->nocache = true;
|
||
14 years ago
|
// this tag does not return compiled code
|
||
13 years ago
|
$compiler->has_code = false;
|
||
11 years ago
|
|
||
14 years ago
|
return true;
|
||
13 years ago
|
}
|
||
|
}
|
||
14 years ago
|
|
||
|
/**
|
||
|
* Smarty Internal Plugin Compile Nocacheclose Class
|
||
13 years ago
|
*
|
||
10 years ago
|
* @package Smarty
|
||
13 years ago
|
* @subpackage Compiler
|
||
|
*/
|
||
11 years ago
|
class Smarty_Internal_Compile_Nocacheclose extends Smarty_Internal_CompileBase
|
||
|
{
|
||
14 years ago
|
/**
|
||
|
* Compiles code for the {/nocache} tag
|
||
13 years ago
|
* This tag does not generate compiled output. It only sets a compiler flag.
|
||
|
*
|
||
9 years ago
|
* @param array $args array with attributes from parser
|
||
|
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
|
||
10 years ago
|
*
|
||
13 years ago
|
* @return bool
|
||
14 years ago
|
*/
|
||
9 years ago
|
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
|
||
14 years ago
|
{
|
||
13 years ago
|
$_attr = $this->getAttributes($compiler, $args);
|
||
10 years ago
|
// leave nocache mode
|
||
9 years ago
|
list($compiler->nocache) = $this->closeTag($compiler, array('nocache'));
|
||
14 years ago
|
// this tag does not return compiled code
|
||
13 years ago
|
$compiler->has_code = false;
|
||
11 years ago
|
|
||
14 years ago
|
return true;
|
||
13 years ago
|
}
|
||
|
}
|