Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
fiktivkod/library/Fiktiv/Highlighter/Geshi.php
2011-03-08 20:38:08 +01:00

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)
{
}
}