/** * Returns unique instance of this DAO. * @return unique instance of this DAO. */ public static function getInstance() { if (self::$instance == null) { self::$instance = new UserDAO(); } return self::$instance; }
/** * Retrieve instance of an UserDAO or create one if it does * not exist. * * @access public * @static * @return UserDAO */ public static function getInstance() { if (!isset(self::$instance)) { self::$instance = new self(); } return self::$instance; }