/framework/vendor/smarty3/lib/libs/sysplugins/smarty_internal_compile_nocache.php
PHP | 59 lines | 22 code | 3 blank | 34 comment | 0 complexity | 42639ba0f37735180c8471472025f42d MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.1
1<?php 2 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*/ 14class 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} 34 35/** 36* Smarty Internal Plugin Compile Nocacheclose Class 37*/ 38class 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} 58 59?>