library/smarty/libs/sysplugins/smarty_internal_compile_rdelim.php
changeset 46 f11c31f7fa3e
parent 45 a56e7f9a0463
child 47 03388ec805b4
equal deleted inserted replaced
45:a56e7f9a0463 46:f11c31f7fa3e
     1 <?php
       
     2 /**
       
     3  * Smarty Internal Plugin Compile Rdelim
       
     4  * Compiles the {rdelim} tag
       
     5  *
       
     6  * @package    Smarty
       
     7  * @subpackage Compiler
       
     8  * @author     Uwe Tews
       
     9  */
       
    10 
       
    11 /**
       
    12  * Smarty Internal Plugin Compile Rdelim Class
       
    13  *
       
    14  * @package    Smarty
       
    15  * @subpackage Compiler
       
    16  */
       
    17 class Smarty_Internal_Compile_Rdelim extends Smarty_Internal_CompileBase {
       
    18     /**
       
    19      * Compiles code for the {rdelim} tag
       
    20      * This tag does output the right delimiter.
       
    21      *
       
    22      * @param  array $args array with attributes from parser
       
    23      * @param  object $compiler compiler object
       
    24      *
       
    25      * @return string compiled code
       
    26      */
       
    27     public function compile($args, $compiler) {
       
    28         $_attr = $this->getAttributes($compiler, $args);
       
    29         if ($_attr['nocache'] === true) {
       
    30             $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
       
    31         }
       
    32         // this tag does not return compiled code
       
    33         $compiler->has_code = true;
       
    34 
       
    35         return $compiler->smarty->right_delimiter;
       
    36     }
       
    37 }