ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
HTMLPurifier_DefinitionCache_Decorator_Cleanup Class Reference

Definition cache decorator class that cleans up the cache whenever there is a cache miss. More...

+ Inheritance diagram for HTMLPurifier_DefinitionCache_Decorator_Cleanup:
+ Collaboration diagram for HTMLPurifier_DefinitionCache_Decorator_Cleanup:

Public Member Functions

 copy ()
 
 add ($def, $config)
 
 set ($def, $config)
 
 replace ($def, $config)
 
 get ($config)
 
- Public Member Functions inherited from HTMLPurifier_DefinitionCache_Decorator
 __construct ()
 
 decorate (&$cache)
 Lazy decorator function. More...
 
 copy ()
 Cross-compatible clone substitute. More...
 
 add ($def, $config)
 
 set ($def, $config)
 
 replace ($def, $config)
 
 get ($config)
 
 remove ($config)
 
 flush ($config)
 
 cleanup ($config)
 
- Public Member Functions inherited from HTMLPurifier_DefinitionCache
 __construct ($type)
 
 generateKey ($config)
 Generates a unique identifier for a particular configuration. More...
 
 isOld ($key, $config)
 Tests whether or not a key is old with respect to the configuration's version and revision number. More...
 
 checkDefType ($def)
 Checks if a definition's type jives with the cache's type. More...
 
 add ($def, $config)
 Adds a definition object to the cache. More...
 
 set ($def, $config)
 Unconditionally saves a definition object to the cache. More...
 
 replace ($def, $config)
 Replace an object in the cache. More...
 
 get ($config)
 Retrieves a definition object from the cache. More...
 
 remove ($config)
 Removes a definition object to the cache. More...
 
 flush ($config)
 Clears all objects from cache. More...
 
 cleanup ($config)
 Clears all expired (older version or revision) objects from cache. More...
 

Data Fields

 $name = 'Cleanup'
 string More...
 
- Data Fields inherited from HTMLPurifier_DefinitionCache_Decorator
 $cache
 Cache object we are decorating HTMLPurifier_DefinitionCache. More...
 
 $name
 
- Data Fields inherited from HTMLPurifier_DefinitionCache
 $type
 string More...
 

Detailed Description

Definition cache decorator class that cleans up the cache whenever there is a cache miss.

Definition at line 7 of file Cleanup.php.

Member Function Documentation

◆ add()

HTMLPurifier_DefinitionCache_Decorator_Cleanup::add (   $def,
  $config 
)
Parameters
HTMLPurifier_Definition$def
HTMLPurifier_Config$config
Returns
mixed

Definition at line 27 of file Cleanup.php.

References $config, and add().

28  {
29  $status = parent::add($def, $config);
30  if (!$status) {
31  parent::cleanup($config);
32  }
33  return $status;
34  }
add()
Definition: add.php:2
+ Here is the call graph for this function:

◆ copy()

HTMLPurifier_DefinitionCache_Decorator_Cleanup::copy ( )
Returns
HTMLPurifier_DefinitionCache_Decorator_Cleanup

Definition at line 17 of file Cleanup.php.

18  {
20  }
Definition cache decorator class that cleans up the cache whenever there is a cache miss...
Definition: Cleanup.php:7

◆ get()

HTMLPurifier_DefinitionCache_Decorator_Cleanup::get (   $config)
Parameters
HTMLPurifier_Config$config
Returns
mixed

Definition at line 68 of file Cleanup.php.

References $config, and $ret.

69  {
70  $ret = parent::get($config);
71  if (!$ret) {
72  parent::cleanup($config);
73  }
74  return $ret;
75  }
$ret
Definition: parser.php:6

◆ replace()

HTMLPurifier_DefinitionCache_Decorator_Cleanup::replace (   $def,
  $config 
)
Parameters
HTMLPurifier_Definition$def
HTMLPurifier_Config$config
Returns
mixed

Definition at line 55 of file Cleanup.php.

References $config.

56  {
57  $status = parent::replace($def, $config);
58  if (!$status) {
59  parent::cleanup($config);
60  }
61  return $status;
62  }

◆ set()

HTMLPurifier_DefinitionCache_Decorator_Cleanup::set (   $def,
  $config 
)
Parameters
HTMLPurifier_Definition$def
HTMLPurifier_Config$config
Returns
mixed

Definition at line 41 of file Cleanup.php.

References $config.

42  {
43  $status = parent::set($def, $config);
44  if (!$status) {
45  parent::cleanup($config);
46  }
47  return $status;
48  }

Field Documentation

◆ $name

HTMLPurifier_DefinitionCache_Decorator_Cleanup::$name = 'Cleanup'

string

Definition at line 12 of file Cleanup.php.


The documentation for this class was generated from the following file: