MDL-19183 imported HTMLpurifier 3.3.0

This commit is contained in:
skodak
2009-05-14 08:31:11 +00:00
parent 1cc9acedbe
commit 63e6a80976
324 changed files with 3017 additions and 2561 deletions
@@ -10,9 +10,9 @@
*/
abstract class HTMLPurifier_DefinitionCache
{
public $type;
/**
* @param $name Type of definition objects this instance of the
* cache will handle.
@@ -20,7 +20,7 @@ abstract class HTMLPurifier_DefinitionCache
public function __construct($type) {
$this->type = $type;
}
/**
* Generates a unique identifier for a particular configuration
* @param Instance of HTMLPurifier_Config
@@ -30,7 +30,7 @@ abstract class HTMLPurifier_DefinitionCache
$config->getBatchSerial($this->type) . ',' .
$config->get($this->type, 'DefinitionRev');
}
/**
* Tests whether or not a key is old with respect to the configuration's
* version and revision number.
@@ -50,7 +50,7 @@ abstract class HTMLPurifier_DefinitionCache
) return true;
return false;
}
/**
* Checks if a definition's type jives with the cache's type
* @note Throws an error on failure
@@ -64,37 +64,37 @@ abstract class HTMLPurifier_DefinitionCache
}
return true;
}
/**
* Adds a definition object to the cache
*/
abstract public function add($def, $config);
/**
* Unconditionally saves a definition object to the cache
*/
abstract public function set($def, $config);
/**
* Replace an object in the cache
*/
abstract public function replace($def, $config);
/**
* Retrieves a definition object from the cache
*/
abstract public function get($config);
/**
* Removes a definition object to the cache
*/
abstract public function remove($config);
/**
* Clears all objects from cache
*/
abstract public function flush($config);
/**
* Clears all expired (older version or revision) objects from cache
* @note Be carefuly implementing this method as flush. Flush must
@@ -102,6 +102,7 @@ abstract class HTMLPurifier_DefinitionCache
* should not be repeatedly called by userland code.
*/
abstract public function cleanup($config);
}
// vim: et sw=4 sts=4