You are here

function HTMLPurifier_DefinitionCache_Drupal::set in HTML Purifier 5

Same name and namespace in other branches
  1. 6.2 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::set()
  2. 6 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::set()
  3. 7.2 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::set()
  4. 7 HTMLPurifier_DefinitionCache_Drupal.php \HTMLPurifier_DefinitionCache_Drupal::set()

Unconditionally add an object to the cache, overwrites any existing object.

File

./HTMLPurifier_DefinitionCache_Drupal.php, line 35

Class

HTMLPurifier_DefinitionCache_Drupal
Cache handler that stores all data in drupals builtin cache

Code

function set($def, $config) {
  if (!$this
    ->checkDefType($def)) {
    return;
  }
  $key = $this
    ->generateKey($config);
  $this
    ->storeInDrupalCache($def, $key);
  return true;
}