2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4 * Abstract base class for Highlighter renderers
8 * LICENSE: This source file is subject to version 3.0 of the PHP license
9 * that is available through the world-wide-web at the following URI:
10 * http://www.php.net/license/3_0.txt. If you did not receive a copy of
11 * the PHP License and are unable to obtain it through the web, please
12 * send a note to license@php.net so we can mail you a copy immediately.
15 * @package Text_Highlighter
16 * @author Andrey Demenev <demenev@gmail.com>
17 * @copyright 2004-2006 Andrey Demenev
18 * @license http://www.php.net/license/3_0.txt PHP License
20 * @link http://pear.php.net/package/Text_Highlighter
24 * Abstract base class for Highlighter renderers
26 * @author Andrey Demenev <demenev@gmail.com>
28 * @package Text_Highlighter
29 * @copyright 2004-2006 Andrey Demenev
30 * @license http://www.php.net/license/3_0.txt PHP License
31 * @version Release: @package_version@
32 * @link http://pear.php.net/package/Text_Highlighter
36 class Text_Highlighter_Renderer
44 var $_options = array();
59 * @param array $options Rendering options. Renderer-specific.
61 function __construct($options = array())
63 $this->_options = $options;
67 * PHP4 compatable constructor
71 * @param array $options Rendering options. Renderer-specific.
73 function Text_Highlighter_Renderer($options = array())
75 $this->__construct($options);
79 * Resets renderer state
83 * @param array $options Rendering options. Renderer-specific.
95 * @param string $str Code to preprocess
96 * @return string Preprocessed code
98 function preprocess($str)
109 * @param string $class Token class
110 * @param string $content Token content
112 function acceptToken($class, $content)
118 * Signals that no more tokens are available
129 * Get generated output
132 * @return mixed Renderer-specific
142 * Set current language
149 function setCurrentLanguage($lang)
151 $this->_language = $lang;
160 * c-hanging-comment-ender-p: nil