PHPIDS
Current file: /home/mario/workspace/php-ids.org/trunk/lib/IDS/vendors/htmlpurifier/HTMLPurifier/Token/Text.php
Legend: executed not executed dead code

  Coverage
  Classes Methods Lines
Total
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 5 / 5
 
HTMLPurifier_Token_Text
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 5 / 5
 public function __construct($data, $line = NULL)
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 4 / 4


       1                 : <?php                                                                       
       2                 :                                                                             
       3                 : /**                                                                         
       4                 :  * Concrete text token class.                                               
       5                 :  *                                                                          
       6                 :  * Text tokens comprise of regular parsed character data (PCDATA) and raw   
       7                 :  * character data (from the CDATA sections). Internally, their              
       8                 :  * data is parsed with all entities expanded. Surprisingly, the text token  
       9                 :  * does have a "tag name" called #PCDATA, which is how the DTD represents it
      10                 :  * in permissible child nodes.                                              
      11                 :  */                                                                         
      12               1 : class HTMLPurifier_Token_Text extends HTMLPurifier_Token                    
      13                 : {                                                                           
      14                 :                                                                             
      15                 :     public $name = '#PCDATA'; /**< PCDATA tag name compatible with DTD. */  
      16                 :     public $data; /**< Parsed character data of text. */                    
      17                 :     public $is_whitespace; /**< Bool indicating if node is whitespace. */   
      18                 :                                                                             
      19                 :     /**                                                                     
      20                 :      * Constructor, accepts data and determines if it is whitespace.        
      21                 :      *                                                                      
      22                 :      * @param $data String parsed character data.                           
      23                 :      */                                                                     
      24                 :     public function __construct($data, $line = null) {                      
      25               2 :         $this->data = $data;                                                
      26               2 :         $this->is_whitespace = ctype_space($data);                          
      27               2 :         $this->line = $line;                                                
      28               2 :     }                                                                       
      29                 :                                                                             
      30                 : }                                                                           

Generated by PHPUnit 3.3.1 and Xdebug 2.0.2 at Thu Sep 25 18:42:10 CEST 2008.