"Fossies" - the Fresh Open Source Software Archive

Member "serendipity/bundled-libs/Text/Wiki/Render/Xhtml/Anchor.php" (20 Nov 2022, 697 Bytes) of package /linux/www/serendipity-2.4.0.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Anchor.php" see the Fossies "Dox" file reference documentation.

    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 ?>