public static function &getInstance() { if (self::$_instance) { return self::$_instance; } self::$_instance = new nxt_Math_2_Formula(); return self::$_instance; }
function _nxt_math_img_inline_render($match) { $formulaImg = nxt_Math_2_Formula::getInstance(); if (defined('MATH_IMG_INLINE_HEIGHT')) { $formulaImg->setHeight(MATH_IMG_INLINE_HEIGHT); } $formulaImg->setFormula($match[1]); return '<img src="' . $formulaImg->getUrl() . '" />'; }