1 | <?php |
||
16 | class remove_bbcodes extends base |
||
17 | { |
||
18 | /** @var config */ |
||
19 | protected $config; |
||
20 | |||
21 | /** @var remove_bbcodes_legacy */ |
||
22 | protected $remove_bbcodes_legacy; |
||
23 | |||
24 | /** @var utils|null */ |
||
25 | protected $text_formatter_utils; |
||
26 | |||
27 | /** @var array Data array of BBCodes to remove */ |
||
28 | protected $data; |
||
29 | |||
30 | /** |
||
31 | * Constructor |
||
32 | * |
||
33 | * @param config $config |
||
34 | * @param remove_bbcodes_legacy $remove_bbcodes_legacy |
||
35 | * @param utils|null $text_formatter_utils |
||
36 | * @access public |
||
37 | */ |
||
38 | public function __construct(config $config, remove_bbcodes_legacy $remove_bbcodes_legacy, utils $text_formatter_utils = null) |
||
44 | |||
45 | /** |
||
46 | * @inheritdoc |
||
47 | */ |
||
48 | public function is_available() |
||
52 | |||
53 | /** |
||
54 | * @inheritdoc |
||
55 | */ |
||
56 | public function run() |
||
68 | |||
69 | /** |
||
70 | * @inheritdoc |
||
71 | */ |
||
72 | public function set_data() |
||
82 | |||
83 | /** |
||
84 | * Remove specified BBCodes and their contents |
||
85 | * |
||
86 | * @return string Stripped message text |
||
87 | * @access protected |
||
88 | */ |
||
89 | protected function process() |
||
98 | |||
99 | /** |
||
100 | * Is the message s9e formatted |
||
101 | * |
||
102 | * @return bool True if message is s9e formatted, false otherwise |
||
103 | */ |
||
104 | protected function s9e_format() |
||
108 | } |
||
109 |