smarty_internal_parsetree.php
Current file: C:\DATA\Viktor\Diplomka\XSLT-Benchmarking/Libs/Smarty/sysplugins/smarty_internal_parsetree.php
Legend: executed not executed dead code

  Coverage
  Classes Functions / Methods Lines
Total
12.50% 1 / 8
0.00% 0 / 17 CRAP
0.00% 0 / 99
_smarty_parsetree
100.00% 1 / 1
100.00% 1 / 1 1
100.00% 0 / 0
 to_smarty_php()
100.00% 1 / 1 1
100.00% 0 / 0
_smarty_tag
0.00% 0 / 1
0.00% 0 / 3 12
0.00% 0 / 8
 __construct($parser, $data)
0.00% 0 / 1 2
0.00% 0 / 4
 to_smarty_php()
0.00% 0 / 1 2
0.00% 0 / 1
 assign_to_var()
0.00% 0 / 1 2
0.00% 0 / 3
_smarty_code
0.00% 0 / 1
0.00% 0 / 2 6
0.00% 0 / 4
 __construct($parser, $data)
0.00% 0 / 1 2
0.00% 0 / 3
 to_smarty_php()
0.00% 0 / 1 2
0.00% 0 / 1
_smarty_doublequoted
0.00% 0 / 1
0.00% 0 / 3 210
0.00% 0 / 35
 __construct($parser, _smarty_parsetree $subtree)
0.00% 0 / 1 6
0.00% 0 / 6
 append_subtree(_smarty_parsetree $subtree)
0.00% 0 / 1 56
0.00% 0 / 14
 to_smarty_php()
0.00% 0 / 1 30
0.00% 0 / 15
_smarty_dq_content
0.00% 0 / 1
0.00% 0 / 2 6
0.00% 0 / 4
 __construct($parser, $data)
0.00% 0 / 1 2
0.00% 0 / 3
 to_smarty_php()
0.00% 0 / 1 2
0.00% 0 / 1
_smarty_template_buffer
0.00% 0 / 1
0.00% 0 / 3 462
0.00% 0 / 40
 __construct($parser)
0.00% 0 / 1 2
0.00% 0 / 2
 append_subtree(_smarty_parsetree $subtree)
0.00% 0 / 1 2
0.00% 0 / 2
 to_smarty_php()
0.00% 0 / 1 380
0.00% 0 / 36
_smarty_text
0.00% 0 / 1
0.00% 0 / 2 6
0.00% 0 / 4
 __construct($parser, $data)
0.00% 0 / 1 2
0.00% 0 / 3
 to_smarty_php()
0.00% 0 / 1 2
0.00% 0 / 1
_smarty_linebreak
0.00% 0 / 1
0.00% 0 / 2 6
0.00% 0 / 4
 __construct($parser, $data)
0.00% 0 / 1 2
0.00% 0 / 3
 to_smarty_php()
0.00% 0 / 1 2
0.00% 0 / 1



       1                 : <?php                                                                                                                                                                                                                           
       2                 : /**                                                                                                                                                                                                                             
       3                 :  * Smarty Internal Plugin Templateparser Parsetrees                                                                                                                                                                             
       4                 :  *                                                                                                                                                                                                                              
       5                 :  * These are classes to build parsetrees in the template parser                                                                                                                                                                 
       6                 :  *                                                                                                                                                                                                                              
       7                 :  * @package Smarty                                                                                                                                                                                                              
       8                 :  * @subpackage Compiler                                                                                                                                                                                                         
       9                 :  * @author Thue Kristensen                                                                                                                                                                                                      
      10                 :  * @author Uwe Tews                                                                                                                                                                                                             
      11                 :  */                                                                                                                                                                                                                             
      12                 :                                                                                                                                                                                                                                 
      13                 : /**                                                                                                                                                                                                                             
      14                 :  * @package Smarty                                                                                                                                                                                                              
      15                 :  * @subpackage Compiler                                                                                                                                                                                                         
      16                 :  * @ignore                                                                                                                                                                                                                      
      17                 :  */                                                                                                                                                                                                                             
      18                 : abstract class _smarty_parsetree {                                                                                                                                                                                              
      19                 :                                                                                                                                                                                                                                 
      20                 :     /**                                                                                                                                                                                                                         
      21                 :      * Parser object                                                                                                                                                                                                            
      22                 :      * @var object                                                                                                                                                                                                              
      23                 :      */                                                                                                                                                                                                                         
      24                 :     public $parser;                                                                                                                                                                                                             
      25                 :     /**                                                                                                                                                                                                                         
      26                 :      * Buffer content                                                                                                                                                                                                           
      27                 :      * @var mixed                                                                                                                                                                                                               
      28                 :      */                                                                                                                                                                                                                         
      29                 :     public $data;                                                                                                                                                                                                               
      30                 :                                                                                                                                                                                                                                 
      31                 :     /**                                                                                                                                                                                                                         
      32                 :      * Return buffer                                                                                                                                                                                                            
      33                 :      *                                                                                                                                                                                                                          
      34                 :      * @return string  buffer content                                                                                                                                                                                           
      35                 :      */                                                                                                                                                                                                                         
      36                 :     abstract public function to_smarty_php();                                                                                                                                                                                   
      37                 :                                                                                                                                                                                                                                 
      38                 : }                                                                                                                                                                                                                               
      39                 :                                                                                                                                                                                                                                 
      40                 : /**                                                                                                                                                                                                                             
      41                 :  * A complete smarty tag.                                                                                                                                                                                                       
      42                 :  *                                                                                                                                                                                                                              
      43                 :  * @package Smarty                                                                                                                                                                                                              
      44                 :  * @subpackage Compiler                                                                                                                                                                                                         
      45                 :  * @ignore                                                                                                                                                                                                                      
      46                 :  */                                                                                                                                                                                                                             
      47                 : class _smarty_tag extends _smarty_parsetree {                                                                                                                                                                                   
      48                 :                                                                                                                                                                                                                                 
      49                 :     /**                                                                                                                                                                                                                         
      50                 :      * Saved block nesting level                                                                                                                                                                                                
      51                 :      * @var int                                                                                                                                                                                                                 
      52                 :      */                                                                                                                                                                                                                         
      53                 :     public $saved_block_nesting;                                                                                                                                                                                                
      54                 :                                                                                                                                                                                                                                 
      55                 :     /**                                                                                                                                                                                                                         
      56                 :      * Create parse tree buffer for Smarty tag                                                                                                                                                                                  
      57                 :      *                                                                                                                                                                                                                          
      58                 :      * @param object $parser    parser object                                                                                                                                                                                   
      59                 :      * @param string $data      content                                                                                                                                                                                         
      60                 :      */                                                                                                                                                                                                                         
      61                 :     public function __construct($parser, $data)                                                                                                                                                                                 
      62                 :     {                                                                                                                                                                                                                           
      63               0 :         $this->parser = $parser;                                                                                                                                                                                                
      64               0 :         $this->data = $data;                                                                                                                                                                                                    
      65               0 :         $this->saved_block_nesting = $parser->block_nesting_level;                                                                                                                                                              
      66               0 :     }                                                                                                                                                                                                                           
      67                 :                                                                                                                                                                                                                                 
      68                 :     /**                                                                                                                                                                                                                         
      69                 :      * Return buffer content                                                                                                                                                                                                    
      70                 :      *                                                                                                                                                                                                                          
      71                 :      * @return string  content                                                                                                                                                                                                  
      72                 :      */                                                                                                                                                                                                                         
      73                 :     public function to_smarty_php()                                                                                                                                                                                             
      74                 :     {                                                                                                                                                                                                                           
      75               0 :         return $this->data;                                                                                                                                                                                                     
      76                 :     }                                                                                                                                                                                                                           
      77                 :                                                                                                                                                                                                                                 
      78                 :     /**                                                                                                                                                                                                                         
      79                 :      * Return complied code that loads the evaluated outout of buffer content into a temporary variable                                                                                                                         
      80                 :      *                                                                                                                                                                                                                          
      81                 :      * @return string template code                                                                                                                                                                                             
      82                 :      */                                                                                                                                                                                                                         
      83                 :     public function assign_to_var()                                                                                                                                                                                             
      84                 :     {                                                                                                                                                                                                                           
      85               0 :         $var = sprintf('$_tmp%d', ++$this->parser->prefix_number);                                                                                                                                                              
      86               0 :         $this->parser->compiler->prefix_code[] = sprintf('<?php ob_start();?>%s<?php %s=ob_get_clean();?>', $this->data, $var);                                                                                                 
      87               0 :         return $var;                                                                                                                                                                                                            
      88                 :     }                                                                                                                                                                                                                           
      89                 :                                                                                                                                                                                                                                 
      90                 : }                                                                                                                                                                                                                               
      91                 :                                                                                                                                                                                                                                 
      92                 : /**                                                                                                                                                                                                                             
      93                 :  * Code fragment inside a tag.                                                                                                                                                                                                  
      94                 :  *                                                                                                                                                                                                                              
      95                 :  * @package Smarty                                                                                                                                                                                                              
      96                 :  * @subpackage Compiler                                                                                                                                                                                                         
      97                 :  * @ignore                                                                                                                                                                                                                      
      98                 :  */                                                                                                                                                                                                                             
      99                 : class _smarty_code extends _smarty_parsetree {                                                                                                                                                                                  
     100                 :                                                                                                                                                                                                                                 
     101                 :                                                                                                                                                                                                                                 
     102                 :     /**                                                                                                                                                                                                                         
     103                 :      * Create parse tree buffer for code fragment                                                                                                                                                                               
     104                 :      *                                                                                                                                                                                                                          
     105                 :      * @param object $parser    parser object                                                                                                                                                                                   
     106                 :      * @param string $data      content                                                                                                                                                                                         
     107                 :      */                                                                                                                                                                                                                         
     108                 :     public function __construct($parser, $data)                                                                                                                                                                                 
     109                 :     {                                                                                                                                                                                                                           
     110               0 :         $this->parser = $parser;                                                                                                                                                                                                
     111               0 :         $this->data = $data;                                                                                                                                                                                                    
     112               0 :     }                                                                                                                                                                                                                           
     113                 :                                                                                                                                                                                                                                 
     114                 :     /**                                                                                                                                                                                                                         
     115                 :      * Return buffer content in parentheses                                                                                                                                                                                     
     116                 :      *                                                                                                                                                                                                                          
     117                 :      * @return string  content                                                                                                                                                                                                  
     118                 :      */                                                                                                                                                                                                                         
     119                 :     public function to_smarty_php()                                                                                                                                                                                             
     120                 :     {                                                                                                                                                                                                                           
     121               0 :         return sprintf("(%s)", $this->data);                                                                                                                                                                                    
     122                 :     }                                                                                                                                                                                                                           
     123                 :                                                                                                                                                                                                                                 
     124                 : }                                                                                                                                                                                                                               
     125                 :                                                                                                                                                                                                                                 
     126                 : /**                                                                                                                                                                                                                             
     127                 :  * Double quoted string inside a tag.                                                                                                                                                                                           
     128                 :  *                                                                                                                                                                                                                              
     129                 :  * @package Smarty                                                                                                                                                                                                              
     130                 :  * @subpackage Compiler                                                                                                                                                                                                         
     131                 :  * @ignore                                                                                                                                                                                                                      
     132                 :  */                                                                                                                                                                                                                             
     133                 : class _smarty_doublequoted extends _smarty_parsetree {                                                                                                                                                                          
     134                 :                                                                                                                                                                                                                                 
     135                 :     /**                                                                                                                                                                                                                         
     136                 :      * Create parse tree buffer for double quoted string subtrees                                                                                                                                                               
     137                 :      *                                                                                                                                                                                                                          
     138                 :      * @param object $parser    parser object                                                                                                                                                                                   
     139                 :      * @param _smarty_parsetree $subtree    parsetree buffer                                                                                                                                                                    
     140                 :      */                                                                                                                                                                                                                         
     141                 :     public function __construct($parser, _smarty_parsetree $subtree)                                                                                                                                                            
     142                 :     {                                                                                                                                                                                                                           
     143               0 :         $this->parser = $parser;                                                                                                                                                                                                
     144               0 :         $this->subtrees[] = $subtree;                                                                                                                                                                                           
     145               0 :         if ($subtree instanceof _smarty_tag) {                                                                                                                                                                                  
     146               0 :             $this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);                                                                                                                                    
     147               0 :         }                                                                                                                                                                                                                       
     148               0 :     }                                                                                                                                                                                                                           
     149                 :                                                                                                                                                                                                                                 
     150                 :     /**                                                                                                                                                                                                                         
     151                 :      * Append buffer to subtree                                                                                                                                                                                                 
     152                 :      *                                                                                                                                                                                                                          
     153                 :      * @param _smarty_parsetree $subtree  parsetree buffer                                                                                                                                                                      
     154                 :      */                                                                                                                                                                                                                         
     155                 :     public function append_subtree(_smarty_parsetree $subtree)                                                                                                                                                                  
     156                 :     {                                                                                                                                                                                                                           
     157               0 :         $last_subtree = count($this->subtrees) - 1;                                                                                                                                                                             
     158               0 :         if ($last_subtree >= 0 && $this->subtrees[$last_subtree] instanceof _smarty_tag && $this->subtrees[$last_subtree]->saved_block_nesting < $this->parser->block_nesting_level) {                                          
     159               0 :             if ($subtree instanceof _smarty_code) {                                                                                                                                                                             
     160               0 :                 $this->subtrees[$last_subtree]->data .= '<?php echo ' . $subtree->data . ';?>';                                                                                                                                 
     161               0 :             } elseif ($subtree instanceof _smarty_dq_content) {                                                                                                                                                                 
     162               0 :                 $this->subtrees[$last_subtree]->data .= '<?php echo "' . $subtree->data . '";?>';                                                                                                                               
     163               0 :             } else {                                                                                                                                                                                                            
     164               0 :                 $this->subtrees[$last_subtree]->data .= $subtree->data;                                                                                                                                                         
     165                 :             }                                                                                                                                                                                                                   
     166               0 :         } else {                                                                                                                                                                                                                
     167               0 :             $this->subtrees[] = $subtree;                                                                                                                                                                                       
     168                 :         }                                                                                                                                                                                                                       
     169               0 :         if ($subtree instanceof _smarty_tag) {                                                                                                                                                                                  
     170               0 :             $this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);                                                                                                                                    
     171               0 :         }                                                                                                                                                                                                                       
     172               0 :     }                                                                                                                                                                                                                           
     173                 :                                                                                                                                                                                                                                 
     174                 :     /**                                                                                                                                                                                                                         
     175                 :      * Merge subtree buffer content together                                                                                                                                                                                    
     176                 :      *                                                                                                                                                                                                                          
     177                 :      * @return string  compiled template code                                                                                                                                                                                   
     178                 :      */                                                                                                                                                                                                                         
     179                 :     public function to_smarty_php()                                                                                                                                                                                             
     180                 :     {                                                                                                                                                                                                                           
     181               0 :         $code = '';                                                                                                                                                                                                             
     182               0 :         foreach ($this->subtrees as $subtree) {                                                                                                                                                                                 
     183               0 :             if ($code !== "") {                                                                                                                                                                                                 
     184               0 :                 $code .= ".";                                                                                                                                                                                                   
     185               0 :             }                                                                                                                                                                                                                   
     186               0 :             if ($subtree instanceof _smarty_tag) {                                                                                                                                                                              
     187               0 :                 $more_php = $subtree->assign_to_var();                                                                                                                                                                          
     188               0 :             } else {                                                                                                                                                                                                            
     189               0 :                 $more_php = $subtree->to_smarty_php();                                                                                                                                                                          
     190                 :             }                                                                                                                                                                                                                   
     191                 :                                                                                                                                                                                                                                 
     192               0 :             $code .= $more_php;                                                                                                                                                                                                 
     193                 :                                                                                                                                                                                                                                 
     194               0 :             if (!$subtree instanceof _smarty_dq_content) {                                                                                                                                                                      
     195               0 :                 $this->parser->compiler->has_variable_string = true;                                                                                                                                                            
     196               0 :             }                                                                                                                                                                                                                   
     197               0 :         }                                                                                                                                                                                                                       
     198               0 :         return $code;                                                                                                                                                                                                           
     199                 :     }                                                                                                                                                                                                                           
     200                 :                                                                                                                                                                                                                                 
     201                 : }                                                                                                                                                                                                                               
     202                 :                                                                                                                                                                                                                                 
     203                 : /**                                                                                                                                                                                                                             
     204                 :  * Raw chars as part of a double quoted string.                                                                                                                                                                                 
     205                 :  *                                                                                                                                                                                                                              
     206                 :  * @package Smarty                                                                                                                                                                                                              
     207                 :  * @subpackage Compiler                                                                                                                                                                                                         
     208                 :  * @ignore                                                                                                                                                                                                                      
     209                 :  */                                                                                                                                                                                                                             
     210                 : class _smarty_dq_content extends _smarty_parsetree {                                                                                                                                                                            
     211                 :                                                                                                                                                                                                                                 
     212                 :                                                                                                                                                                                                                                 
     213                 :     /**                                                                                                                                                                                                                         
     214                 :      * Create parse tree buffer with string content                                                                                                                                                                             
     215                 :      *                                                                                                                                                                                                                          
     216                 :      * @param object $parser  parser object                                                                                                                                                                                     
     217                 :      * @param string $data    string section                                                                                                                                                                                    
     218                 :      */                                                                                                                                                                                                                         
     219                 :     public function __construct($parser, $data)                                                                                                                                                                                 
     220                 :     {                                                                                                                                                                                                                           
     221               0 :         $this->parser = $parser;                                                                                                                                                                                                
     222               0 :         $this->data = $data;                                                                                                                                                                                                    
     223               0 :     }                                                                                                                                                                                                                           
     224                 :                                                                                                                                                                                                                                 
     225                 :     /**                                                                                                                                                                                                                         
     226                 :      * Return content as double quoted string                                                                                                                                                                                   
     227                 :      *                                                                                                                                                                                                                          
     228                 :      * @return string doubled quoted string                                                                                                                                                                                     
     229                 :      */                                                                                                                                                                                                                         
     230                 :     public function to_smarty_php()                                                                                                                                                                                             
     231                 :     {                                                                                                                                                                                                                           
     232               0 :         return '"' . $this->data . '"';                                                                                                                                                                                         
     233                 :     }                                                                                                                                                                                                                           
     234                 :                                                                                                                                                                                                                                 
     235                 : }                                                                                                                                                                                                                               
     236                 :                                                                                                                                                                                                                                 
     237                 : /**                                                                                                                                                                                                                             
     238                 :  * Template element                                                                                                                                                                                                             
     239                 :  *                                                                                                                                                                                                                              
     240                 :  * @package Smarty                                                                                                                                                                                                              
     241                 :  * @subpackage Compiler                                                                                                                                                                                                         
     242                 :  * @ignore                                                                                                                                                                                                                      
     243                 :  */                                                                                                                                                                                                                             
     244                 : class _smarty_template_buffer extends _smarty_parsetree {                                                                                                                                                                       
     245                 :                                                                                                                                                                                                                                 
     246                 :     /**                                                                                                                                                                                                                         
     247                 :      * Array of template elements                                                                                                                                                                                               
     248                 :      *                                                                                                                                                                                                                          
     249                 :      * @var array                                                                                                                                                                                                               
     250                 :      */                                                                                                                                                                                                                         
     251                 :     public $subtrees = Array();                                                                                                                                                                                                 
     252                 :                                                                                                                                                                                                                                 
     253                 :     /**                                                                                                                                                                                                                         
     254                 :      * Create root of parse tree for template elements                                                                                                                                                                          
     255                 :      *                                                                                                                                                                                                                          
     256                 :      * @param object $parser    parse object                                                                                                                                                                                    
     257                 :      */                                                                                                                                                                                                                         
     258                 :     public function __construct($parser)                                                                                                                                                                                        
     259                 :     {                                                                                                                                                                                                                           
     260               0 :         $this->parser = $parser;                                                                                                                                                                                                
     261               0 :     }                                                                                                                                                                                                                           
     262                 :                                                                                                                                                                                                                                 
     263                 :     /**                                                                                                                                                                                                                         
     264                 :      * Append buffer to subtree                                                                                                                                                                                                 
     265                 :      *                                                                                                                                                                                                                          
     266                 :      * @param _smarty_parsetree $subtree                                                                                                                                                                                        
     267                 :      */                                                                                                                                                                                                                         
     268                 :     public function append_subtree(_smarty_parsetree $subtree)                                                                                                                                                                  
     269                 :     {                                                                                                                                                                                                                           
     270               0 :         $this->subtrees[] = $subtree;                                                                                                                                                                                           
     271               0 :     }                                                                                                                                                                                                                           
     272                 :                                                                                                                                                                                                                                 
     273                 :     /**                                                                                                                                                                                                                         
     274                 :      * Sanitize and merge subtree buffers together                                                                                                                                                                              
     275                 :      *                                                                                                                                                                                                                          
     276                 :      * @return string template code content                                                                                                                                                                                     
     277                 :      */                                                                                                                                                                                                                         
     278                 :     public function to_smarty_php()                                                                                                                                                                                             
     279                 :     {                                                                                                                                                                                                                           
     280               0 :         $code = '';                                                                                                                                                                                                             
     281               0 :         for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) {                                                                                                                                                    
     282               0 :             if ($key + 2 < $cnt) {                                                                                                                                                                                              
     283               0 :                 if ($this->subtrees[$key] instanceof _smarty_linebreak && $this->subtrees[$key + 1] instanceof _smarty_tag && $this->subtrees[$key + 1]->data == '' && $this->subtrees[$key + 2] instanceof _smarty_linebreak) {
     284               0 :                     $key = $key + 1;                                                                                                                                                                                            
     285               0 :                     continue;                                                                                                                                                                                                   
     286                 :                 }                                                                                                                                                                                                               
     287               0 :                 if (substr($this->subtrees[$key]->data, -1) == '<' && $this->subtrees[$key + 1]->data == '' && substr($this->subtrees[$key + 2]->data, -1) == '?') {                                                            
     288               0 :                     $key = $key + 2;                                                                                                                                                                                            
     289               0 :                     continue;                                                                                                                                                                                                   
     290                 :                 }                                                                                                                                                                                                               
     291               0 :             }                                                                                                                                                                                                                   
     292               0 :             if (substr($code, -1) == '<') {                                                                                                                                                                                     
     293               0 :                 $subtree = $this->subtrees[$key]->to_smarty_php();                                                                                                                                                              
     294               0 :                 if (substr($subtree, 0, 1) == '?') {                                                                                                                                                                            
     295               0 :                     $code = substr($code, 0, strlen($code) - 1) . '<<?php ?>?' . substr($subtree, 1);                                                                                                                           
     296               0 :                 } elseif ($this->parser->asp_tags && substr($subtree, 0, 1) == '%') {                                                                                                                                           
     297               0 :                     $code = substr($code, 0, strlen($code) - 1) . '<<?php ?>%' . substr($subtree, 1);                                                                                                                           
     298               0 :                 } else {                                                                                                                                                                                                        
     299               0 :                     $code .= $subtree;                                                                                                                                                                                          
     300                 :                 }                                                                                                                                                                                                               
     301               0 :                 continue;                                                                                                                                                                                                       
     302                 :             }                                                                                                                                                                                                                   
     303               0 :             if ($this->parser->asp_tags && substr($code, -1) == '%') {                                                                                                                                                          
     304               0 :                 $subtree = $this->subtrees[$key]->to_smarty_php();                                                                                                                                                              
     305               0 :                 if (substr($subtree, 0, 1) == '>') {                                                                                                                                                                            
     306               0 :                     $code = substr($code, 0, strlen($code) - 1) . '%<?php ?>>' . substr($subtree, 1);                                                                                                                           
     307               0 :                 } else {                                                                                                                                                                                                        
     308               0 :                     $code .= $subtree;                                                                                                                                                                                          
     309                 :                 }                                                                                                                                                                                                               
     310               0 :                 continue;                                                                                                                                                                                                       
     311                 :             }                                                                                                                                                                                                                   
     312               0 :             if (substr($code, -1) == '?') {                                                                                                                                                                                     
     313               0 :                 $subtree = $this->subtrees[$key]->to_smarty_php();                                                                                                                                                              
     314               0 :                 if (substr($subtree, 0, 1) == '>') {                                                                                                                                                                            
     315               0 :                     $code = substr($code, 0, strlen($code) - 1) . '?<?php ?>>' . substr($subtree, 1);                                                                                                                           
     316               0 :                 } else {                                                                                                                                                                                                        
     317               0 :                     $code .= $subtree;                                                                                                                                                                                          
     318                 :                 }                                                                                                                                                                                                               
     319               0 :                 continue;                                                                                                                                                                                                       
     320                 :             }                                                                                                                                                                                                                   
     321               0 :             $code .= $this->subtrees[$key]->to_smarty_php();                                                                                                                                                                    
     322               0 :         }                                                                                                                                                                                                                       
     323               0 :         return $code;                                                                                                                                                                                                           
     324                 :     }                                                                                                                                                                                                                           
     325                 :                                                                                                                                                                                                                                 
     326                 : }                                                                                                                                                                                                                               
     327                 :                                                                                                                                                                                                                                 
     328                 : /**                                                                                                                                                                                                                             
     329                 :  * template text                                                                                                                                                                                                                
     330                 :  *                                                                                                                                                                                                                              
     331                 :  * @package Smarty                                                                                                                                                                                                              
     332                 :  * @subpackage Compiler                                                                                                                                                                                                         
     333                 :  * @ignore                                                                                                                                                                                                                      
     334                 :  */                                                                                                                                                                                                                             
     335                 : class _smarty_text extends _smarty_parsetree {                                                                                                                                                                                  
     336                 :                                                                                                                                                                                                                                 
     337                 :                                                                                                                                                                                                                                 
     338                 :     /**                                                                                                                                                                                                                         
     339                 :      * Create template text buffer                                                                                                                                                                                              
     340                 :      *                                                                                                                                                                                                                          
     341                 :      * @param object $parser    parser object                                                                                                                                                                                   
     342                 :      * @param string $data      text                                                                                                                                                                                            
     343                 :      */                                                                                                                                                                                                                         
     344                 :     public function __construct($parser, $data)                                                                                                                                                                                 
     345                 :     {                                                                                                                                                                                                                           
     346               0 :         $this->parser = $parser;                                                                                                                                                                                                
     347               0 :         $this->data = $data;                                                                                                                                                                                                    
     348               0 :     }                                                                                                                                                                                                                           
     349                 :                                                                                                                                                                                                                                 
     350                 :     /**                                                                                                                                                                                                                         
     351                 :      * Return buffer content                                                                                                                                                                                                    
     352                 :      *                                                                                                                                                                                                                          
     353                 :      * @return strint text                                                                                                                                                                                                      
     354                 :      */                                                                                                                                                                                                                         
     355                 :     public function to_smarty_php()                                                                                                                                                                                             
     356                 :     {                                                                                                                                                                                                                           
     357               0 :         return $this->data;                                                                                                                                                                                                     
     358                 :     }                                                                                                                                                                                                                           
     359                 :                                                                                                                                                                                                                                 
     360                 : }                                                                                                                                                                                                                               
     361                 :                                                                                                                                                                                                                                 
     362                 : /**                                                                                                                                                                                                                             
     363                 :  * template linebreaks                                                                                                                                                                                                          
     364                 :  *                                                                                                                                                                                                                              
     365                 :  * @package Smarty                                                                                                                                                                                                              
     366                 :  * @subpackage Compiler                                                                                                                                                                                                         
     367                 :  * @ignore                                                                                                                                                                                                                      
     368                 :  */                                                                                                                                                                                                                             
     369                 : class _smarty_linebreak extends _smarty_parsetree {                                                                                                                                                                             
     370                 :                                                                                                                                                                                                                                 
     371                 :     /**                                                                                                                                                                                                                         
     372                 :      * Create buffer with linebreak content                                                                                                                                                                                     
     373                 :      *                                                                                                                                                                                                                          
     374                 :      * @param object $parser    parser object                                                                                                                                                                                   
     375                 :      * @param string  $data     linebreak string                                                                                                                                                                                
     376                 :      */                                                                                                                                                                                                                         
     377                 :     public function __construct($parser, $data)                                                                                                                                                                                 
     378                 :     {                                                                                                                                                                                                                           
     379               0 :         $this->parser = $parser;                                                                                                                                                                                                
     380               0 :         $this->data = $data;                                                                                                                                                                                                    
     381               0 :     }                                                                                                                                                                                                                           
     382                 :                                                                                                                                                                                                                                 
     383                 :     /**                                                                                                                                                                                                                         
     384                 :      * Return linebrak                                                                                                                                                                                                          
     385                 :      *                                                                                                                                                                                                                          
     386                 :      * @return string linebreak                                                                                                                                                                                                 
     387                 :      */                                                                                                                                                                                                                         
     388                 :     public function to_smarty_php()                                                                                                                                                                                             
     389                 :     {                                                                                                                                                                                                                           
     390               0 :         return $this->data;                                                                                                                                                                                                     
     391                 :     }                                                                                                                                                                                                                           
     392                 :                                                                                                                                                                                                                                 
     393                 : }                                                                                                                                                                                                                               
     394                 :                                                                                                                                                                                                                                 


Generated by PHP_CodeCoverage @package_version@ using PHP 5.3.6 and PHPUnit @package_version@ at Tue Jun 26 15:06:55 CEST 2012.