HTMLPurifier_DefinitionCache
Abstract class representing Definition cache managers that implements useful common methods and is a factory.
- Full name:
\HTMLPurifier_DefinitionCache
- This class is an Abstract class
Properties
type
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$type |
string | Type of definition objects this instance of the cache will handle. |
generateKey
Generates a unique identifier for a particular configuration
Parameters:
Parameter | Type | Description |
---|---|---|
$config |
\HTMLPurifier_Config | Instance of HTMLPurifier_Config |
isOld
Tests whether or not a key is old with respect to the configuration's version and revision number.
Parameters:
Parameter | Type | Description |
---|---|---|
$key |
string | Key to test |
$config |
\HTMLPurifier_Config | Instance of HTMLPurifier_Config to test against |
checkDefType
Checks if a definition's type jives with the cache's type
Parameters:
Parameter | Type | Description |
---|---|---|
$def |
\HTMLPurifier_Definition | Definition object to check |
Return Value:
true if good, false if not
add
Adds a definition object to the cache
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$def |
\HTMLPurifier_Definition | |
$config |
\HTMLPurifier_Config |
set
Unconditionally saves a definition object to the cache
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$def |
\HTMLPurifier_Definition | |
$config |
\HTMLPurifier_Config |
replace
Replace an object in the cache
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$def |
\HTMLPurifier_Definition | |
$config |
\HTMLPurifier_Config |
get
Retrieves a definition object from the cache
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$config |
\HTMLPurifier_Config |
remove
Removes a definition object to the cache
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$config |
\HTMLPurifier_Config |
flush
Clears all objects from cache
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$config |
\HTMLPurifier_Config |
cleanup
Clears all expired (older version or revision) objects from cache
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$config |
\HTMLPurifier_Config |
Automatically generated on 2025-03-18