/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'ReceiptId': // Gets the value for intReceiptId (Read-Only PK) // @return integer return $this->intReceiptId; case 'TransactionId': // Gets the value for intTransactionId (Unique) // @return integer return $this->intTransactionId; case 'FromCompanyId': // Gets the value for intFromCompanyId (Not Null) // @return integer return $this->intFromCompanyId; case 'FromContactId': // Gets the value for intFromContactId (Not Null) // @return integer return $this->intFromContactId; case 'ToContactId': // Gets the value for intToContactId (Not Null) // @return integer return $this->intToContactId; case 'ToAddressId': // Gets the value for intToAddressId (Not Null) // @return integer return $this->intToAddressId; case 'ReceiptNumber': // Gets the value for strReceiptNumber (Unique) // @return string return $this->strReceiptNumber; case 'DueDate': // Gets the value for dttDueDate // @return QDateTime return $this->dttDueDate; case 'ReceiptDate': // Gets the value for dttReceiptDate // @return QDateTime return $this->dttReceiptDate; case 'ReceivedFlag': // Gets the value for blnReceivedFlag // @return boolean return $this->blnReceivedFlag; case 'CreatedBy': // Gets the value for intCreatedBy // @return integer return $this->intCreatedBy; case 'CreationDate': // Gets the value for dttCreationDate // @return QDateTime return $this->dttCreationDate; case 'ModifiedBy': // Gets the value for intModifiedBy // @return integer return $this->intModifiedBy; case 'ModifiedDate': // Gets the value for strModifiedDate (Read-Only Timestamp) // @return string return $this->strModifiedDate; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Transaction': // Gets the value for the Transaction object referenced by intTransactionId (Unique) // @return Transaction try { if (!$this->objTransaction && !is_null($this->intTransactionId)) { $this->objTransaction = Transaction::Load($this->intTransactionId); } return $this->objTransaction; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'FromCompany': // Gets the value for the Company object referenced by intFromCompanyId (Not Null) // @return Company try { if (!$this->objFromCompany && !is_null($this->intFromCompanyId)) { $this->objFromCompany = Company::Load($this->intFromCompanyId); } return $this->objFromCompany; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'FromContact': // Gets the value for the Contact object referenced by intFromContactId (Not Null) // @return Contact try { if (!$this->objFromContact && !is_null($this->intFromContactId)) { $this->objFromContact = Contact::Load($this->intFromContactId); } return $this->objFromContact; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'ToContact': // Gets the value for the Contact object referenced by intToContactId (Not Null) // @return Contact try { if (!$this->objToContact && !is_null($this->intToContactId)) { $this->objToContact = Contact::Load($this->intToContactId); } return $this->objToContact; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'ToAddress': // Gets the value for the Address object referenced by intToAddressId (Not Null) // @return Address try { if (!$this->objToAddress && !is_null($this->intToAddressId)) { $this->objToAddress = Address::Load($this->intToAddressId); } return $this->objToAddress; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CreatedByObject': // Gets the value for the UserAccount object referenced by intCreatedBy // @return UserAccount try { if (!$this->objCreatedByObject && !is_null($this->intCreatedBy)) { $this->objCreatedByObject = UserAccount::Load($this->intCreatedBy); } return $this->objCreatedByObject; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'ModifiedByObject': // Gets the value for the UserAccount object referenced by intModifiedBy // @return UserAccount try { if (!$this->objModifiedByObject && !is_null($this->intModifiedBy)) { $this->objModifiedByObject = UserAccount::Load($this->intModifiedBy); } return $this->objModifiedByObject; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'ReceiptCustomFieldHelper': // Gets the value for the ReceiptCustomFieldHelper object that uniquely references this Receipt // by objReceiptCustomFieldHelper (Unique) // @return ReceiptCustomFieldHelper try { if ($this->objReceiptCustomFieldHelper === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objReceiptCustomFieldHelper) { $this->objReceiptCustomFieldHelper = ReceiptCustomFieldHelper::LoadByReceiptId($this->intReceiptId); } return $this->objReceiptCustomFieldHelper; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }