function load() { if ($this->exists() == true) { $this->import(); $this->lng = $this->data['language']; $this->source = $this->data['source']; } else { if (!class_exists('GeSHi')) { include_once 'classes/class.geshi.php'; } global $lang; $language = $this->hasLanguage() ? $this->lng : 'text'; $geshi = new GeSHi($this->source, $language, 'classes/geshi'); $geshi->set_encoding($lang->charset()); $geshi->enable_classes(false); $geshi->set_header_type(GESHI_HEADER_DIV); $geshi->enable_keyword_links(true); $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 5); if (!$this->hasLanguage()) { $geshi->enable_highlighting(false); $geshi->set_numbers_highlighting(false); $geshi->set_brackets_highlighting(false); $language = ''; } else { $language = $geshi->get_language_name(); } $this->data = array('language' => $language, 'parsed' => $geshi->parse_code(), 'source' => $this->source); $this->export(); } }