]> git.immae.eu Git - github/wallabag/wallabag.git/blame - inc/3rdparty/htmlpurifier/HTMLPurifier/TagTransform.php
remove autoload section in composer.json
[github/wallabag/wallabag.git] / inc / 3rdparty / htmlpurifier / HTMLPurifier / TagTransform.php
CommitLineData
d4949327
NL
1<?php\r
2\r
3/**\r
4 * Defines a mutation of an obsolete tag into a valid tag.\r
5 */\r
6abstract class HTMLPurifier_TagTransform\r
7{\r
8\r
9 /**\r
10 * Tag name to transform the tag to.\r
11 * @type string\r
12 */\r
13 public $transform_to;\r
14\r
15 /**\r
16 * Transforms the obsolete tag into the valid tag.\r
17 * @param HTMLPurifier_Token_Tag $tag Tag to be transformed.\r
18 * @param HTMLPurifier_Config $config Mandatory HTMLPurifier_Config object\r
19 * @param HTMLPurifier_Context $context Mandatory HTMLPurifier_Context object\r
20 */\r
21 abstract public function transform($tag, $config, $context);\r
22\r
23 /**\r
24 * Prepends CSS properties to the style attribute, creating the\r
25 * attribute if it doesn't exist.\r
26 * @warning Copied over from AttrTransform, be sure to keep in sync\r
27 * @param array $attr Attribute array to process (passed by reference)\r
28 * @param string $css CSS to prepend\r
29 */\r
30 protected function prependCSS(&$attr, $css)\r
31 {\r
32 $attr['style'] = isset($attr['style']) ? $attr['style'] : '';\r
33 $attr['style'] = $css . $attr['style'];\r
34 }\r
35}\r
36\r
37// vim: et sw=4 sts=4\r