public static function init() { global $__AJAX_TAG_SUPPORT__; if ($__AJAX_TAG_SUPPORT__ === TRUE) { throw new Exception("Ajax::init(): You cannot call this method more than one time in a page."); } $buffer = NULL; try { $buffer = ob_get_contents(); } catch (Exception $e) { } ob_clean(); $runtime = AjaxTagCompiler::init(); $runtime->parse($buffer); $__AJAX_TAG_SUPPORT__ = TRUE; return $runtime; }
public static function init() { if (!isset(self::$_AJAX_TAG_PARSER)) { $c = __CLASS__; self::$_AJAX_TAG_PARSER = new $c(); } return self::$_AJAX_TAG_PARSER; }