PHPIDS | ||||
![]() | ||||
|
||||
![]() |
Coverage | ||||||||||||
Classes | Methods | Lines | ||||||||||
Total |
|
100.00% | 1 / 1 |
|
30.00% | 3 / 10 |
|
50.00% | 7 / 14 | |||
HTMLPurifier_DefinitionCache_Decorator |
|
100.00% | 1 / 1 |
|
30.00% | 3 / 10 |
|
50.00% | 7 / 14 | |||
public function __construct() |
|
100.00% | 1 / 1 |
|
100.00% | 1 / 1 | ||||||
public function decorate(&$cache) |
|
100.00% | 1 / 1 |
|
100.00% | 4 / 4 | ||||||
public function copy() |
|
0.00% | 0 / 1 |
|
0.00% | 0 / 1 | ||||||
public function add($def, $config) |
|
0.00% | 0 / 1 |
|
0.00% | 0 / 1 | ||||||
public function set($def, $config) |
|
0.00% | 0 / 1 |
|
0.00% | 0 / 1 | ||||||
public function replace($def, $config) |
|
0.00% | 0 / 1 |
|
0.00% | 0 / 1 | ||||||
public function get($config) |
|
100.00% | 1 / 1 |
|
100.00% | 1 / 1 | ||||||
public function remove($config) |
|
0.00% | 0 / 1 |
|
0.00% | 0 / 1 | ||||||
public function flush($config) |
|
0.00% | 0 / 1 |
|
0.00% | 0 / 1 | ||||||
public function cleanup($config) |
|
0.00% | 0 / 1 |
|
0.00% | 0 / 1 |
1 : <?php 2 : 3 1 : class HTMLPurifier_DefinitionCache_Decorator extends HTMLPurifier_DefinitionCache 4 : { 5 : 6 : /** 7 : * Cache object we are decorating 8 : */ 9 : public $cache; 10 : 11 1 : public function __construct() {} 12 : 13 : /** 14 : * Lazy decorator function 15 : * @param $cache Reference to cache object to decorate 16 : */ 17 : public function decorate(&$cache) { 18 1 : $decorator = $this->copy(); 19 : // reference is necessary for mocks in PHP 4 20 1 : $decorator->cache =& $cache; 21 1 : $decorator->type = $cache->type; 22 1 : return $decorator; 23 : } 24 : 25 : /** 26 : * Cross-compatible clone substitute 27 : */ 28 : public function copy() { 29 0 : return new HTMLPurifier_DefinitionCache_Decorator(); 30 : } 31 : 32 : public function add($def, $config) { 33 0 : return $this->cache->add($def, $config); 34 : } 35 : 36 : public function set($def, $config) { 37 0 : return $this->cache->set($def, $config); 38 : } 39 : 40 : public function replace($def, $config) { 41 0 : return $this->cache->replace($def, $config); 42 : } 43 : 44 : public function get($config) { 45 2 : return $this->cache->get($config); 46 : } 47 : 48 : public function remove($config) { 49 0 : return $this->cache->remove($config); 50 : } 51 : 52 : public function flush($config) { 53 0 : return $this->cache->flush($config); 54 : } 55 : 56 : public function cleanup($config) { 57 0 : return $this->cache->cleanup($config); 58 : } 59 : 60 : } 61 : |
![]() |
Generated by PHPUnit 3.3.1 and Xdebug 2.0.2 at Thu Sep 25 18:42:10 CEST 2008. |