/**
  * 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;
 }
Example #2
0
 /**
  * Set Account ID
  *
  * @param integer $id Account ID
  */
 function setAccountID($id)
 {
     $this->accountid = $id;
     $this->accountDBO = load_AccountDBO($id);
 }
Example #3
0
 /**
  * Get Account DBO
  *
  * @return AccountDBO Account DBO
  */
 public function getAccount()
 {
     try {
         return load_AccountDBO($this->getAccountID());
     } catch (DBNoRowsFoundException $e) {
         return null;
     }
 }