PHPIDS
Current file: /home/mario/workspace/php-ids.org/trunk/lib/IDS/vendors/htmlpurifier/HTMLPurifier/HTMLModule/Edit.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% 2 / 2
100.00 %100.00%
100.00% 10 / 10
 
HTMLPurifier_HTMLModule_Edit
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 2 / 2
100.00 %100.00%
100.00% 10 / 10
 public function __construct()
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 6 / 6
 public function getChildDef($def)
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 3 / 3


       1                 : <?php                                                                     
       2                 :                                                                           
       3                 : /**                                                                       
       4                 :  * XHTML 1.1 Edit Module, defines editing-related elements. Text Extension
       5                 :  * Module.                                                                
       6                 :  */                                                                       
       7               1 : class HTMLPurifier_HTMLModule_Edit extends HTMLPurifier_HTMLModule        
       8                 : {                                                                         
       9                 :                                                                           
      10                 :     public $name = 'Edit';                                                
      11                 :                                                                           
      12                 :     public function __construct() {                                       
      13               1 :         $contents = 'Chameleon: #PCDATA | Inline ! #PCDATA | Flow';       
      14                 :         $attr = array(                                                    
      15               1 :             'cite' => 'URI',                                              
      16                 :             // 'datetime' => 'Datetime', // not implemented               
      17               1 :         );                                                                
      18               1 :         $this->addElement('del', 'Inline', $contents, 'Common', $attr);   
      19               1 :         $this->addElement('ins', 'Inline', $contents, 'Common', $attr);   
      20               1 :     }                                                                     
      21                 :                                                                           
      22                 :     // HTML 4.01 specifies that ins/del must not contain block            
      23                 :     // elements when used in an inline context, chameleon is              
      24                 :     // a complicated workaround to acheive this effect                    
      25                 :                                                                           
      26                 :     // Inline context ! Block context (exclamation mark is                
      27                 :     // separator, see getChildDef for parsing)                            
      28                 :                                                                           
      29                 :     public $defines_child_def = true;                                     
      30                 :     public function getChildDef($def) {                                   
      31               1 :         if ($def->content_model_type != 'chameleon') return false;        
      32               1 :         $value = explode('!', $def->content_model);                       
      33               1 :         return new HTMLPurifier_ChildDef_Chameleon($value[0], $value[1]); 
      34                 :     }                                                                     
      35                 :                                                                           
      36                 : }                                                                         
      37                 :                                                                           

Generated by PHPUnit 3.2.20 and Xdebug 2.0.3 at Sat Jun 7 16:15:42 CEST 2008.