API - XOOPS 2.5.11 Beta 2
By monxoops.fr
HTMLPurifier_DefinitionCache Class Reference
Inheritance diagram for HTMLPurifier_DefinitionCache:

Public Member Functions

 __construct ($type)
 
 generateKey ($config)
 
 isOld ($key, $config)
 
 checkDefType ($def)
 
 add ($def, $config)
 
 set ($def, $config)
 
 replace ($def, $config)
 
 get ($config)
 
 remove ($config)
 
 flush ($config)
 
 cleanup ($config)
 

Data Fields

 $type
 

Detailed Description

Abstract class representing Definition cache managers that implements useful common methods and is a factory.

Todo:

Create a separate maintenance file advanced users can use to cache their custom HTMLDefinition, which can be loaded via a configuration directive

Implement memcached

Constructor & Destructor Documentation

◆ __construct()

__construct (   $type)
Parameters
string$typeType of definition objects this instance of the cache will handle.

Member Function Documentation

◆ add()

◆ checkDefType()

checkDefType (   $def)

Checks if a definition's type jives with the cache's type

Note
Throws an error on failure
Parameters
HTMLPurifier_Definition$defDefinition object to check
Returns
bool true if good, false if not
Here is the caller graph for this function:

◆ cleanup()

cleanup (   $config)
abstract

Clears all expired (older version or revision) objects from cache

Note
Be careful implementing this method as flush. Flush must not interfere with other Definition types, and cleanup() should not be repeatedly called by userland code.
Parameters
HTMLPurifier_Config$config

Reimplemented in HTMLPurifier_DefinitionCache_Decorator, HTMLPurifier_DefinitionCache_Null, and HTMLPurifier_DefinitionCache_Serializer.

◆ flush()

flush (   $config)
abstract

◆ generateKey()

generateKey (   $config)

Generates a unique identifier for a particular configuration

Parameters
HTMLPurifier_Config$configInstance of HTMLPurifier_Config
Returns
string
Here is the caller graph for this function:

◆ get()

◆ isOld()

isOld (   $key,
  $config 
)

Tests whether or not a key is old with respect to the configuration's version and revision number.

Parameters
string$keyKey to test
HTMLPurifier_Config$configInstance of HTMLPurifier_Config to test against
Returns
bool
Here is the caller graph for this function:

◆ remove()

remove (   $config)
abstract

Removes a definition object to the cache

Parameters
HTMLPurifier_Config$config

Reimplemented in HTMLPurifier_DefinitionCache_Decorator, HTMLPurifier_DefinitionCache_Null, and HTMLPurifier_DefinitionCache_Serializer.

◆ replace()

◆ set()

Field Documentation

◆ $type

$type

@type string


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