library/smarty/libs/sysplugins/smarty_internal_parsetree_dqcontent.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 Templateparser Parse Tree
       
     4  * These are classes to build parse tree  in the template parser
       
     5  *
       
     6  * @package    Smarty
       
     7  * @subpackage Compiler
       
     8  * @author     Thue Kristensen
       
     9  * @author     Uwe Tews
       
    10  */
       
    11 
       
    12 /**
       
    13  * Raw chars as part of a double quoted string.
       
    14  *
       
    15  * @package    Smarty
       
    16  * @subpackage Compiler
       
    17  * @ignore
       
    18  */
       
    19 class Smarty_Internal_ParseTree_DqContent extends Smarty_Internal_ParseTree {
       
    20     /**
       
    21      * Create parse tree buffer with string content
       
    22      *
       
    23      * @param object $parser parser object
       
    24      * @param string $data string section
       
    25      */
       
    26     public function __construct($parser, $data) {
       
    27         $this->parser = $parser;
       
    28         $this->data = $data;
       
    29     }
       
    30 
       
    31     /**
       
    32      * Return content as double quoted string
       
    33      *
       
    34      * @return string doubled quoted string
       
    35      */
       
    36     public function to_smarty_php() {
       
    37         return '"' . $this->data . '"';
       
    38     }
       
    39 }