/** * 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 'ContactId': // Gets the value for intContactId (Read-Only PK) // @return integer return $this->intContactId; case 'CompanyId': // Gets the value for intCompanyId (Not Null) // @return integer return $this->intCompanyId; case 'AddressId': // Gets the value for intAddressId // @return integer return $this->intAddressId; case 'FirstName': // Gets the value for strFirstName // @return string return $this->strFirstName; case 'LastName': // Gets the value for strLastName (Not Null) // @return string return $this->strLastName; case 'Title': // Gets the value for strTitle // @return string return $this->strTitle; case 'Email': // Gets the value for strEmail // @return string return $this->strEmail; case 'PhoneOffice': // Gets the value for strPhoneOffice // @return string return $this->strPhoneOffice; case 'PhoneHome': // Gets the value for strPhoneHome // @return string return $this->strPhoneHome; case 'PhoneMobile': // Gets the value for strPhoneMobile // @return string return $this->strPhoneMobile; case 'Fax': // Gets the value for strFax // @return string return $this->strFax; case 'Description': // Gets the value for strDescription // @return string return $this->strDescription; 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 'Company': // Gets the value for the Company object referenced by intCompanyId (Not Null) // @return Company try { if (!$this->objCompany && !is_null($this->intCompanyId)) { $this->objCompany = Company::Load($this->intCompanyId); } return $this->objCompany; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Address': // Gets the value for the Address object referenced by intAddressId // @return Address try { if (!$this->objAddress && !is_null($this->intAddressId)) { $this->objAddress = Address::Load($this->intAddressId); } return $this->objAddress; } 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 'ContactCustomFieldHelper': // Gets the value for the ContactCustomFieldHelper object that uniquely references this Contact // by objContactCustomFieldHelper (Unique) // @return ContactCustomFieldHelper try { if ($this->objContactCustomFieldHelper === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objContactCustomFieldHelper) { $this->objContactCustomFieldHelper = ContactCustomFieldHelper::LoadByContactId($this->intContactId); } return $this->objContactCustomFieldHelper; } 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 '_AssetTransactionCheckoutAsTo': // Gets the value for the private _objAssetTransactionCheckoutAsTo (Read-Only) // if set due to an expansion on the asset_transaction_checkout.to_contact_id reverse relationship // @return AssetTransactionCheckout return $this->_objAssetTransactionCheckoutAsTo; case '_AssetTransactionCheckoutAsToArray': // Gets the value for the private _objAssetTransactionCheckoutAsToArray (Read-Only) // if set due to an ExpandAsArray on the asset_transaction_checkout.to_contact_id reverse relationship // @return AssetTransactionCheckout[] return (array) $this->_objAssetTransactionCheckoutAsToArray; case '_ReceiptAsFrom': // Gets the value for the private _objReceiptAsFrom (Read-Only) // if set due to an expansion on the receipt.from_contact_id reverse relationship // @return Receipt return $this->_objReceiptAsFrom; case '_ReceiptAsFromArray': // Gets the value for the private _objReceiptAsFromArray (Read-Only) // if set due to an ExpandAsArray on the receipt.from_contact_id reverse relationship // @return Receipt[] return (array) $this->_objReceiptAsFromArray; case '_ReceiptAsTo': // Gets the value for the private _objReceiptAsTo (Read-Only) // if set due to an expansion on the receipt.to_contact_id reverse relationship // @return Receipt return $this->_objReceiptAsTo; case '_ReceiptAsToArray': // Gets the value for the private _objReceiptAsToArray (Read-Only) // if set due to an ExpandAsArray on the receipt.to_contact_id reverse relationship // @return Receipt[] return (array) $this->_objReceiptAsToArray; case '_ShipmentAsFrom': // Gets the value for the private _objShipmentAsFrom (Read-Only) // if set due to an expansion on the shipment.from_contact_id reverse relationship // @return Shipment return $this->_objShipmentAsFrom; case '_ShipmentAsFromArray': // Gets the value for the private _objShipmentAsFromArray (Read-Only) // if set due to an ExpandAsArray on the shipment.from_contact_id reverse relationship // @return Shipment[] return (array) $this->_objShipmentAsFromArray; case '_ShipmentAsTo': // Gets the value for the private _objShipmentAsTo (Read-Only) // if set due to an expansion on the shipment.to_contact_id reverse relationship // @return Shipment return $this->_objShipmentAsTo; case '_ShipmentAsToArray': // Gets the value for the private _objShipmentAsToArray (Read-Only) // if set due to an ExpandAsArray on the shipment.to_contact_id reverse relationship // @return Shipment[] return (array) $this->_objShipmentAsToArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }