1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Comrade42\PhpBBParser\Helper\BBCodes; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Interface ParserInterface |
7
|
|
|
* @package Comrade42\PhpBBParser\Helper\BBCodes |
8
|
|
|
*/ |
9
|
|
|
interface ParserInterface |
10
|
|
|
{ |
11
|
|
|
/** |
12
|
|
|
* Parses all BBCode tags in the HTML source at once |
13
|
|
|
* |
14
|
|
|
* @param string $html |
15
|
|
|
* @return string |
16
|
|
|
*/ |
17
|
|
|
public static function parseAll($html); |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* Parses [b], [u], [i] and [strike] tags in the HTML source |
21
|
|
|
* |
22
|
|
|
* @param string $html |
23
|
|
|
* @return string |
24
|
|
|
*/ |
25
|
|
|
public static function parseTypeface($html); |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* Parses [left], [right], [center] and [justify] tags in the HTML source |
29
|
|
|
* |
30
|
|
|
* @param string $html |
31
|
|
|
* @return string |
32
|
|
|
*/ |
33
|
|
|
public static function parseAlign($html); |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Parses [color] tag in the HTML source |
37
|
|
|
* |
38
|
|
|
* @param string $html |
39
|
|
|
* @return string |
40
|
|
|
*/ |
41
|
|
|
public static function parseColor($html); |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* Parses [size] tag in the HTML source |
45
|
|
|
* |
46
|
|
|
* @param string $html |
47
|
|
|
* @return string |
48
|
|
|
*/ |
49
|
|
|
public static function parseSize($html); |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Parses [font] tag in the HTML source |
53
|
|
|
* |
54
|
|
|
* @param string $html |
55
|
|
|
* @return string |
56
|
|
|
*/ |
57
|
|
|
public static function parseFont($html); |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* Parses [quote] tag in the HTML source |
61
|
|
|
* |
62
|
|
|
* @param string $html |
63
|
|
|
* @return string |
64
|
|
|
*/ |
65
|
|
|
public static function parseQuote($html); |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* Parses [code] tag in the HTML source |
69
|
|
|
* |
70
|
|
|
* @param string $html |
71
|
|
|
* @return string |
72
|
|
|
*/ |
73
|
|
|
public static function parseCode($html); |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Parses [hide] tag in the HTML source |
77
|
|
|
* |
78
|
|
|
* @param string $html |
79
|
|
|
* @return string |
80
|
|
|
*/ |
81
|
|
|
public static function parseHide($html); |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* Parses [list] tag in the HTML source |
85
|
|
|
* |
86
|
|
|
* @param string $html |
87
|
|
|
* @return string |
88
|
|
|
*/ |
89
|
|
|
public static function parseList($html); |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* Parses [url] tag in the HTML source |
93
|
|
|
* |
94
|
|
|
* @param string $html |
95
|
|
|
* @return string |
96
|
|
|
*/ |
97
|
|
|
public static function parseLink($html); |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* Parses [img] tag in the HTML source |
101
|
|
|
* |
102
|
|
|
* @param string $html |
103
|
|
|
* @return string |
104
|
|
|
*/ |
105
|
|
|
public static function parseImage($html); |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* Parses [youtube] and [dailymotion] tags in the HTML source |
109
|
|
|
* |
110
|
|
|
* @param string $html |
111
|
|
|
* @return string |
112
|
|
|
*/ |
113
|
|
|
public static function parseVideo($html); |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* Parses [flash] and [embed-flash] tags in the HTML source |
117
|
|
|
* |
118
|
|
|
* @param string $html |
119
|
|
|
* @return string |
120
|
|
|
*/ |
121
|
|
|
public static function parseFlash($html); |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* Parses [table] tag in the HTML source |
125
|
|
|
* |
126
|
|
|
* @param string $html |
127
|
|
|
* @return string |
128
|
|
|
*/ |
129
|
|
|
public static function parseTable($html); |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* Parses [scroll] and [updown] tags in the HTML source |
133
|
|
|
* |
134
|
|
|
* @param string $html |
135
|
|
|
* @return string |
136
|
|
|
*/ |
137
|
|
|
public static function parseScrolling($html); |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* Parses [hr] tag in the HTML source |
141
|
|
|
* |
142
|
|
|
* @param string $html |
143
|
|
|
* @return string |
144
|
|
|
*/ |
145
|
|
|
public static function parseLine($html); |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* Parses [sub] and [sup] tags in the HTML source |
149
|
|
|
* |
150
|
|
|
* @param string $html |
151
|
|
|
* @return string |
152
|
|
|
*/ |
153
|
|
|
public static function parseIndex($html); |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* Parses [flipv], [fliph], [blur] and [fade] tags in the HTML source |
157
|
|
|
* |
158
|
|
|
* @param string $html |
159
|
|
|
* @return string |
160
|
|
|
*/ |
161
|
|
|
public static function parseEffect($html); |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* Parses [rand] tag in the HTML source |
165
|
|
|
* |
166
|
|
|
* @param string $html |
167
|
|
|
* @return string |
168
|
|
|
*/ |
169
|
|
|
public static function parseRandom($html); |
170
|
|
|
} |
171
|
|
|
|