1 | <?php |
||
22 | class Tables extends Html5BaseModule implements ModuleInterface{ |
||
23 | |||
24 | /** |
||
25 | * An array of tags the module is able to process |
||
26 | * |
||
27 | * @var array |
||
28 | * @see \chillerlan\bbcode\Modules\Tagmap::$tags |
||
29 | */ |
||
30 | protected $tags = ['col', 'colgroup', 'caption', 'table', 'thead', 'tbody', 'tfoot', 'tr', 'td', 'th']; |
||
31 | |||
32 | /** |
||
33 | * An optional array of tags contained in self::$tags which are marked as "single tag" |
||
34 | * |
||
35 | * @var array |
||
36 | * @see \chillerlan\bbcode\Modules\Tagmap::$singletags |
||
37 | */ |
||
38 | protected $singletags = ['col']; |
||
39 | |||
40 | /** |
||
41 | * Transforms the bbcode, called from BaseModuleInterface |
||
42 | * |
||
43 | * @return string a transformed snippet |
||
44 | * @see \chillerlan\bbcode\Modules\BaseModuleInterface::transform() |
||
45 | * @internal |
||
46 | */ |
||
47 | public function __transform():string{ |
||
67 | |||
68 | /** |
||
69 | * Processes [table] |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | protected function table():string{ |
||
79 | |||
80 | /** |
||
81 | * Processes [col] |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | protected function col():string{ |
||
90 | |||
91 | /** |
||
92 | * Processes [colgroup] |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | protected function colgroup():string{ |
||
101 | |||
102 | /** |
||
103 | * Processes [caption] |
||
104 | * |
||
105 | * @return string |
||
106 | */ |
||
107 | protected function caption():string{ |
||
110 | |||
111 | /** |
||
112 | * Processes [tr|thead|tbody|tfoot] |
||
113 | * |
||
114 | * @return string |
||
115 | */ |
||
116 | protected function rows():string{ |
||
119 | |||
120 | /** |
||
121 | * Processes [td|th] |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | protected function cells():string{ |
||
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | protected function getCellStyle():string{ |
||
173 | |||
174 | } |
||
175 |