/** * a factory for this class * @access public * @static * @return NewDao */ public static function getInstance() { if (!self::$_link || !self::connected()) { throw new NewDaoException('not connected'); } if (!self::$_instance) { self::$_instance = new NewDao(); } return self::$_instance; }