transform_to = $transform_to; $this->style = $style; } function transform($tag, $config, &$context) { $new_tag = $tag->copy(); $new_tag->name = $this->transform_to; if (!is_null($this->style) && ($new_tag->type == 'start' || $new_tag->type == 'empty') ) { $this->prependCSS($new_tag->attr, $this->style); } return $new_tag; } }