import of Diogenes 0.9.18
[diogenes.git] / include / Text / Wiki / Render / Xhtml / Anchor.php
1 <?php
2
3 /**
4 *
5 * This class renders an anchor target name in XHTML.
6 *
7 * @author Manuel Holtgrewe <purestorm at ggnore dot net>
8 *
9 * @author Paul M. Jones <pmjones at ciaweb dot net>
10 *
11 * @package Text_Wiki
12 *
13 */
14
15 class Text_Wiki_Render_Xhtml_Anchor extends Text_Wiki_Render {
16
17 var $conf = array(
18 'css' => null
19 );
20
21 function token($options)
22 {
23 extract($options); // $type, $name
24
25 if ($type == 'start') {
26 $css = $this->formatConf(' class="%s"', 'css');
27 $format = "<a$css id=\"%s\">";
28 return sprintf($format ,$name);
29 }
30
31 if ($type == 'end') {
32 return '</a>';
33 }
34 }
35 }
36
37 ?>