/** * Repair the subparsers and their events */ static final function repairSubparsers() { $events = array('beforeParse', 'afterInclude', 'afterParse', 'afterReplace'); $news = array(); foreach (self::$__sub_parsers as $parser => $function) { $arr = explode(":", $parser); if (isset($arr[1])) { $last = array_pop($arr); if (array_search($last, $events) !== false) { continue; } } foreach ($events as $event) { if (!isset(self::$__sub_parsers["{$parser}:{$event}"])) { $news["{$parser}:{$event}"] = $function; } } } self::$__sub_parsers = array_merge(self::$__sub_parsers, $news); }