Beispiel #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 'Id':
             // Gets the value for intId (Read-Only PK)
             // @return integer
             return $this->intId;
         case 'LinkedMarriageId':
             // Gets the value for intLinkedMarriageId (Unique)
             // @return integer
             return $this->intLinkedMarriageId;
         case 'PersonId':
             // Gets the value for intPersonId (Not Null)
             // @return integer
             return $this->intPersonId;
         case 'MarriedToPersonId':
             // Gets the value for intMarriedToPersonId
             // @return integer
             return $this->intMarriedToPersonId;
         case 'MarriageStatusTypeId':
             // Gets the value for intMarriageStatusTypeId (Not Null)
             // @return integer
             return $this->intMarriageStatusTypeId;
         case 'DateStart':
             // Gets the value for dttDateStart
             // @return QDateTime
             return $this->dttDateStart;
         case 'DateEnd':
             // Gets the value for dttDateEnd
             // @return QDateTime
             return $this->dttDateEnd;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'LinkedMarriage':
             // Gets the value for the Marriage object referenced by intLinkedMarriageId (Unique)
             // @return Marriage
             try {
                 if (!$this->objLinkedMarriage && !is_null($this->intLinkedMarriageId)) {
                     $this->objLinkedMarriage = Marriage::Load($this->intLinkedMarriageId);
                 }
                 return $this->objLinkedMarriage;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Person':
             // Gets the value for the Person object referenced by intPersonId (Not Null)
             // @return Person
             try {
                 if (!$this->objPerson && !is_null($this->intPersonId)) {
                     $this->objPerson = Person::Load($this->intPersonId);
                 }
                 return $this->objPerson;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'MarriedToPerson':
             // Gets the value for the Person object referenced by intMarriedToPersonId
             // @return Person
             try {
                 if (!$this->objMarriedToPerson && !is_null($this->intMarriedToPersonId)) {
                     $this->objMarriedToPerson = Person::Load($this->intMarriedToPersonId);
                 }
                 return $this->objMarriedToPerson;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'MarriageAsLinked':
             // Gets the value for the Marriage object that uniquely references this Marriage
             // by objMarriageAsLinked (Unique)
             // @return Marriage
             try {
                 if ($this->objMarriageAsLinked === false) {
                     // We've attempted early binding -- and the reverse reference object does not exist
                     return null;
                 }
                 if (!$this->objMarriageAsLinked) {
                     $this->objMarriageAsLinked = Marriage::LoadByLinkedMarriageId($this->intId);
                 }
                 return $this->objMarriageAsLinked;
             } 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;
             }
     }
 }