getContent(), $this->getType($file)); $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS); $geshi->set_header_type(GESHI_HEADER_DIV); if ($res !== null) { $geshi->highlight_lines_extra(array_keys($res->annotations)); $geshi->set_highlight_lines_extra_style('background-color: #F2DEDE'); } return '
' . $geshi->parse_code() . '
'; } /** * Returns the type of the file, as used by Geshi * * @return string */ public function getType($file) { $ext = $file->getExt(); if (isset($GLOBALS['phorkie']['languages'][$ext]['geshi'])) { $ext = $GLOBALS['phorkie']['languages'][$ext]['geshi']; } return $ext; } } ?>