/**
  * Validate an Account ID
  *
  * Verifies that the account exists.
  *
  * @param string $data Field data
  * @return AccountDBO Account DBO for this Account ID
  * @throws RecordNotFoundException
  */
 public function validate($data)
 {
     $data = parent::validate($data);
     try {
         $accountDBO = load_AccountDBO(intval($data));
     } catch (DBNoRowsFoundException $e) {
         throw new RecordNotFoundException("Account");
     }
     return $accountDBO;
 }
示例#2
0
 /**
  * Set Account ID
  *
  * @param integer $id Account ID
  */
 function setAccountID($id)
 {
     $this->accountid = $id;
     $this->accountDBO = load_AccountDBO($id);
 }
示例#3
0
 /**
  * Get Account DBO
  *
  * @return AccountDBO Account DBO
  */
 public function getAccount()
 {
     try {
         return load_AccountDBO($this->getAccountID());
     } catch (DBNoRowsFoundException $e) {
         return null;
     }
 }