1: <?php
2: /**
3: * This class renders Horde Registry links.
4: *
5: * @package Wicked
6: */
7: class Text_Wiki_Render_Xhtml_Registrylink extends Text_Wiki_Render
8: {
9: /**
10: * Renders a token into text matching the requested format.
11: *
12: * @access public
13: *
14: * @param array $options The "options" portion of the token (second
15: * element).
16: *
17: * @return string The text rendered from the token options.
18: */
19: public function token($options)
20: {
21: try {
22: $link = new Horde_Url($GLOBALS['registry']->link($options['method'], $options['args']));
23: } catch (Horde_Exception $e) {
24: return $e->getMessage();
25: }
26:
27: return $link->link() . $options['title'] . '</a>';
28: }
29: }
30: