Text_Wiki
[ class tree: Text_Wiki ] [ index: Text_Wiki ] [ all elements ]

Source for file Translatehtml.php

Documentation is available at Translatehtml.php

  1. <?php
  2. // $Id: Translatehtml.php,v 1.1 2004/06/06 15:44:34 pmjones Exp $
  3.  
  4.  
  5. /**
  6. * Translate HTML entities in the source text.
  7. @author Paul M. Jones <pmjones@ciaweb.net>
  8. @package Text_Wiki
  9. */
  10.  
  11.     
  12.     var $conf = array('type' => HTML_ENTITIES);
  13.     
  14.     /**
  15.     * 
  16.     * Simple parsing method.
  17.     *
  18.     * @access public
  19.     * 
  20.     */
  21.     
  22.     function parse()
  23.     {
  24.         // get the type of html translation
  25.         $type $this->getConf('type'null);
  26.         
  27.         // shoule we translate?
  28.         if ($type{
  29.         
  30.             // yes! get the translation table.
  31.             $xlate get_html_translation_table($type);
  32.             
  33.             // remove the delimiter character it doesn't get translated
  34.             unset($xlate[$this->wiki->delim]);
  35.             
  36.             // convert!
  37.             $this->wiki->source = strtr($this->wiki->source$xlate);
  38.         }
  39.     }
  40.  
  41. }
  42. ?>

Documentation generated on Mon, 11 Mar 2019 13:51:29 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.