PHPIDS
Current file: /home/mario/workspace/php-ids.org/trunk/lib/IDS/vendors/htmlpurifier/HTMLPurifier/Strategy/Composite.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_Strategy_Composite
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 execute($tokens, $config, $context)
100.00 %100.00%
100.00% 1 / 1
100.00 %100.00%
100.00% 4 / 4


       1                 : <?php                                                                       
       2                 :                                                                             
       3                 : /**                                                                         
       4                 :  * Composite strategy that runs multiple strategies on tokens.              
       5                 :  */                                                                         
       6               1 : abstract class HTMLPurifier_Strategy_Composite extends HTMLPurifier_Strategy
       7                 : {                                                                           
       8                 :                                                                             
       9                 :     /**                                                                     
      10                 :      * List of strategies to run tokens through.                            
      11                 :      */                                                                     
      12                 :     protected $strategies = array();                                        
      13                 :                                                                             
      14                 :     abstract public function __construct();                                 
      15                 :                                                                             
      16                 :     public function execute($tokens, $config, $context) {                   
      17               2 :         foreach ($this->strategies as $strategy) {                          
      18               2 :             $tokens = $strategy->execute($tokens, $config, $context);       
      19               2 :         }                                                                   
      20               2 :         return $tokens;                                                     
      21                 :     }                                                                       
      22                 :                                                                             
      23                 : }                                                                           
      24                 :                                                                             

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