1: <?php
2: 3: 4:
5: class Text_Wiki_Render_Xhtml_Code2 extends Text_Wiki_Render_Xhtml_Code
6: {
7: 8: 9: 10: 11: 12: 13: 14:
15: public function token($options)
16: {
17: $part = new Horde_Mime_Part();
18: $part->setContents($options['text']);
19: $part->setType('application/x-extension-' . $options['attr']['type']);
20: $viewer = Horde_Mime_Viewer::factory(
21: 'Horde_Core_Mime_Viewer_Syntaxhighlighter',
22: $part,
23: array('registry' => $GLOBALS['registry']));
24: $data = $viewer->render('inline');
25: $data = reset($data);
26: return $data['data'];
27: }
28: }
29: