26 lines
560 B
PHP
26 lines
560 B
PHP
<?php
|
|
|
|
require_once 'geshi/geshi.php';
|
|
|
|
class Fiktiv_Highlighter_Geshi extends Fiktiv_Highlighter_Abstract
|
|
{
|
|
protected $_geshi = null;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->_geshi = new GeSHi();
|
|
}
|
|
|
|
public function highlight($code, $lang = null, $options = array())
|
|
{
|
|
$this->_geshi->set_language($lang);
|
|
$this->_geshi->set_source($code);
|
|
$this->_geshi->set_header_type(GESHI_HEADER_DIV);
|
|
return $this->_geshi->parse_code();
|
|
}
|
|
|
|
public function setOptions($options)
|
|
{
|
|
|
|
}
|
|
}
|