public static function parse(&$string, $type, $options = array()) { if(empty(self::$basepath)) { global $CFG; self::$basepath = $CFG->dirroot.'/mod/wiki/parser/'; } $type = strtolower($type); if(self::create_parser_instance($type)) { return self::$parsers[$type]->parse($string, $options); } else { return false; } }
public static function parse(&$string, $type, $options = array()) { if (empty(self::$basepath)) { global $CFG; self::$basepath = $CFG->dirroot . '/mod/wiki/parser/'; } $type = strtolower($type); self::$parsers[$type] = null; // Reset the current parser because it may have other options. if (self::create_parser_instance($type)) { return self::$parsers[$type]->parse($string, $options); } else { return false; } }