Example #1
0
 /**
  * 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 'AddressId':
             // Gets the value for intAddressId (Read-Only PK)
             // @return integer
             return $this->intAddressId;
         case 'CompanyId':
             // Gets the value for intCompanyId (Not Null)
             // @return integer
             return $this->intCompanyId;
         case 'ShortDescription':
             // Gets the value for strShortDescription (Not Null)
             // @return string
             return $this->strShortDescription;
         case 'CountryId':
             // Gets the value for intCountryId (Not Null)
             // @return integer
             return $this->intCountryId;
         case 'Address1':
             // Gets the value for strAddress1 (Not Null)
             // @return string
             return $this->strAddress1;
         case 'Address2':
             // Gets the value for strAddress2
             // @return string
             return $this->strAddress2;
         case 'City':
             // Gets the value for strCity (Not Null)
             // @return string
             return $this->strCity;
         case 'StateProvinceId':
             // Gets the value for intStateProvinceId
             // @return integer
             return $this->intStateProvinceId;
         case 'PostalCode':
             // Gets the value for strPostalCode (Not Null)
             // @return string
             return $this->strPostalCode;
         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 'Country':
             // Gets the value for the Country object referenced by intCountryId (Not Null)
             // @return Country
             try {
                 if (!$this->objCountry && !is_null($this->intCountryId)) {
                     $this->objCountry = Country::Load($this->intCountryId);
                 }
                 return $this->objCountry;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'StateProvince':
             // Gets the value for the StateProvince object referenced by intStateProvinceId
             // @return StateProvince
             try {
                 if (!$this->objStateProvince && !is_null($this->intStateProvinceId)) {
                     $this->objStateProvince = StateProvince::Load($this->intStateProvinceId);
                 }
                 return $this->objStateProvince;
             } 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 'AddressCustomFieldHelper':
             // Gets the value for the AddressCustomFieldHelper object that uniquely references this Address
             // by objAddressCustomFieldHelper (Unique)
             // @return AddressCustomFieldHelper
             try {
                 if ($this->objAddressCustomFieldHelper === false) {
                     // We've attempted early binding -- and the reverse reference object does not exist
                     return null;
                 }
                 if (!$this->objAddressCustomFieldHelper) {
                     $this->objAddressCustomFieldHelper = AddressCustomFieldHelper::LoadByAddressId($this->intAddressId);
                 }
                 return $this->objAddressCustomFieldHelper;
             } 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 '_Company':
             // Gets the value for the private _objCompany (Read-Only)
             // if set due to an expansion on the company.address_id reverse relationship
             // @return Company
             return $this->_objCompany;
         case '_CompanyArray':
             // Gets the value for the private _objCompanyArray (Read-Only)
             // if set due to an ExpandAsArray on the company.address_id reverse relationship
             // @return Company[]
             return (array) $this->_objCompanyArray;
         case '_Contact':
             // Gets the value for the private _objContact (Read-Only)
             // if set due to an expansion on the contact.address_id reverse relationship
             // @return Contact
             return $this->_objContact;
         case '_ContactArray':
             // Gets the value for the private _objContactArray (Read-Only)
             // if set due to an ExpandAsArray on the contact.address_id reverse relationship
             // @return Contact[]
             return (array) $this->_objContactArray;
         case '_ReceiptAsTo':
             // Gets the value for the private _objReceiptAsTo (Read-Only)
             // if set due to an expansion on the receipt.to_address_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_address_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_address_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_address_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_address_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_address_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;
             }
     }
 }