HTMLPurifier 4.4.0
/home/ezyang/Dev/htmlpurifier/library/HTMLPurifier/AttrTransform.php
Go to the documentation of this file.
00001 <?php
00002 
00017 abstract class HTMLPurifier_AttrTransform
00018 {
00019 
00029     abstract public function transform($attr, $config, $context);
00030 
00037     public function prependCSS(&$attr, $css) {
00038         $attr['style'] = isset($attr['style']) ? $attr['style'] : '';
00039         $attr['style'] = $css . $attr['style'];
00040     }
00041 
00047     public function confiscateAttr(&$attr, $key) {
00048         if (!isset($attr[$key])) return null;
00049         $value = $attr[$key];
00050         unset($attr[$key]);
00051         return $value;
00052     }
00053 
00054 }
00055 
00056 // vim: et sw=4 sts=4