static function get_instance() { if (!(isset(self::$object) && self::$object instanceof Smarty)) { self::$object = new Smarty(); } return isset(self::$object) ? self::$object : null; }