3
require_once dirname(__FILE__) . '/source.php';
6
* The MIME_Viewer_php class renders out syntax-highlighted PHP code
9
* $Horde: framework/MIME/MIME/Viewer/php.php,v 1.22.10.1 2005/01/03 12:19:06 jan Exp $
11
* Copyright 1999-2005 Chuck Hagenbuch <chuck@horde.org>
13
* See the enclosed file COPYING for license information (LGPL). If you
14
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
16
* @author Chuck Hagenbuch <chuck@horde.org>
17
* @version $Revision: 1.22.10.1 $
19
* @package Horde_MIME_Viewer
21
class MIME_Viewer_php extends MIME_Viewer_source {
24
* Renders out the contents.
28
* @param optional array $params Any parameters the Viewer may need.
30
* @return string The rendered contents.
32
function render($params = array())
34
return $this->lineNumber(trim(str_replace(array("\n", '<br />'), array('', "\n"),
35
highlight_string($this->mime_part->getContents(), true))));