Url.php 894 Bytes
Newer Older
zYne's avatar
zYne committed
1 2 3 4
<?php


class Text_Wiki_Render_Latex_Url extends Text_Wiki_Render {
5 6


zYne's avatar
zYne committed
7 8 9 10 11
    var $conf = array(
        'target' => false,
        'images' => true,
        'img_ext' => array('jpg', 'jpeg', 'gif', 'png')
    );
12

zYne's avatar
zYne committed
13
    /**
14
    *
zYne's avatar
zYne committed
15
    * Renders a token into text matching the requested format.
16
    *
zYne's avatar
zYne committed
17
    * @access public
18
    *
zYne's avatar
zYne committed
19 20
    * @param array $options The "options" portion of the token (second
    * element).
21
    *
zYne's avatar
zYne committed
22
    * @return string The text rendered from the token options.
23
    *
zYne's avatar
zYne committed
24
    */
25

zYne's avatar
zYne committed
26 27 28 29 30 31
    function token($options)
    {
        // create local variables from the options array (text,
        // href, type)
        extract($options);

32 33 34 35 36 37 38
        if ($options['type'] == 'start') {
            return '';
        } else if ($options['type'] == 'end') {
            return '\footnote{' . $href . '}';
        } else {
            return $text . '\footnote{' . $href . '}';
        }
zYne's avatar
zYne committed
39 40 41
    }
}
?>