Abstract Class HTMLPurifier_DefinitionCache
Abstract class representing Definition cache managers that implements useful common methods and is a factory.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$type | HTMLPurifier_DefinitionCache |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | HTMLPurifier_DefinitionCache | |
add() | Adds a definition object to the cache | HTMLPurifier_DefinitionCache |
checkDefType() | Checks if a definition's type jives with the cache's type | HTMLPurifier_DefinitionCache |
cleanup() | Clears all expired (older version or revision) objects from cache | HTMLPurifier_DefinitionCache |
flush() | Clears all objects from cache | HTMLPurifier_DefinitionCache |
generateKey() | Generates a unique identifier for a particular configuration | HTMLPurifier_DefinitionCache |
get() | Retrieves a definition object from the cache | HTMLPurifier_DefinitionCache |
isOld() | Tests whether or not a key is old with respect to the configuration's version and revision number. | HTMLPurifier_DefinitionCache |
remove() | Removes a definition object to the cache | HTMLPurifier_DefinitionCache |
replace() | Replace an object in the cache | HTMLPurifier_DefinitionCache |
set() | Unconditionally saves a definition object to the cache | HTMLPurifier_DefinitionCache |
Property Details
Method Details
public void __construct ( $type ) | ||
$type | string | Type of definition objects this instance of the
|
Adds a definition object to the cache
public abstract void add ( $def, $config ) | ||
$def | HTMLPurifier_Definition | |
$config | HTMLPurifier_Config |
Checks if a definition's type jives with the cache's type
public bool checkDefType ( $def ) | ||
$def | HTMLPurifier_Definition | Definition object to check |
return | bool | True if good, false if not |
---|
Clears all expired (older version or revision) objects from cache
public abstract void cleanup ( $config ) | ||
$config | HTMLPurifier_Config |
Clears all objects from cache
public abstract void flush ( $config ) | ||
$config | HTMLPurifier_Config |
Generates a unique identifier for a particular configuration
public string generateKey ( $config ) | ||
$config | HTMLPurifier_Config | Instance of HTMLPurifier_Config |
Retrieves a definition object from the cache
public abstract void get ( $config ) | ||
$config | HTMLPurifier_Config |
Tests whether or not a key is old with respect to the configuration's version and revision number.
public bool isOld ( $key, $config ) | ||
$key | string | Key to test |
$config | HTMLPurifier_Config | Instance of HTMLPurifier_Config to test against |
Removes a definition object to the cache
public abstract void remove ( $config ) | ||
$config | HTMLPurifier_Config |
Replace an object in the cache
public abstract void replace ( $def, $config ) | ||
$def | HTMLPurifier_Definition | |
$config | HTMLPurifier_Config |
Unconditionally saves a definition object to the cache
public abstract void set ( $def, $config ) | ||
$def | HTMLPurifier_Definition | |
$config | HTMLPurifier_Config |