function HTMLPurifier_DefinitionCache_Drupal::replace in HTML Purifier 7
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()
- 6 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::replace()
- 7.2 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::replace()
Replace an object that already exists in the cache.
File
- ./
HTMLPurifier_DefinitionCache_Drupal.php, line 38
Class
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;
}