1 <?php
3 /**
4 * Smarty Internal Plugin Compile Nocache
5 *
6 * Compiles the {nocache} {/nocache} tags
7 * @package Smarty
8 * @subpackage Compiler
9 * @author Uwe Tews
10 */
11 /**
12 * Smarty Internal Plugin Compile Nocache Class
13 */
14 class Smarty_Internal_Compile_Nocache extends Smarty_Internal_CompileBase {
15 /**
16 * Compiles code for the {nocache} tag
17 *
18 * This tag does not generate compiled output. It only sets a compiler flag
19 * @param array $args array with attributes from parser
20 * @param object $compiler compiler object
21 * @return string compiled code
22 */
23 public function compile($args, $compiler)
24 {
25 $this->compiler = $compiler;
26 $_attr = $this->_get_attributes($args);
27 // enter nocache mode
28 $this->compiler->nocache = true;
29 // this tag does not return compiled code
30 $this->compiler->has_code = false;
31 return true;
32 }
33 }
35 /**
36 * Smarty Internal Plugin Compile Nocacheclose Class
37 */
38 class Smarty_Internal_Compile_Nocacheclose extends Smarty_Internal_CompileBase {
39 /**
40 * Compiles code for the {/nocache} tag
41 *
42 * This tag does not generate compiled output. It only sets a compiler flag
43 * @param array $args array with attributes from parser
44 * @param object $compiler compiler object
45 * @return string compiled code
46 */
47 public function compile($args, $compiler)
48 {
49 $this->compiler = $compiler;
50 $_attr = $this->_get_attributes($args);
51 // leave nocache mode
52 $this->compiler->nocache = false;
53 // this tag does not return compiled code
54 $this->compiler->has_code = false;
55 return true;
56 }
57 }
59 ?>