function HTMLPurifier_DefinitionCache_Drupal::replace in HTML Purifier 6
Same name and namespace in other branches
- 5 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::replace()
- 6.2 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::replace()
- 7.2 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::replace()
- 7 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::replace()
Replace an object that already exists in the cache.
File
- ./
HTMLPurifier_DefinitionCache_Drupal.php, line 39
Class
- HTMLPurifier_DefinitionCache_Drupal
- Cache handler that stores all data in drupals builtin cache
Code
function replace($def, $config) {
if (!$this
->checkDefType($def)) {
return;
}
$key = $this
->generateKey($config);
if (!$this
->fetchFromDrupalCache($key)) {
// object does not exist in cache
return false;
}
$this
->storeInDrupalCache($def, $key);
return true;
}