/** * 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 'WikiItemId': // Gets the value for intWikiItemId (Not Null) // @return integer return $this->intWikiItemId; case 'VersionNumber': // Gets the value for intVersionNumber (Not Null) // @return integer return $this->intVersionNumber; case 'Name': // Gets the value for strName // @return string return $this->strName; case 'PostedByPersonId': // Gets the value for intPostedByPersonId (Not Null) // @return integer return $this->intPostedByPersonId; case 'PostDate': // Gets the value for dttPostDate (Not Null) // @return QDateTime return $this->dttPostDate; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'WikiItem': // Gets the value for the WikiItem object referenced by intWikiItemId (Not Null) // @return WikiItem try { if (!$this->objWikiItem && !is_null($this->intWikiItemId)) { $this->objWikiItem = WikiItem::Load($this->intWikiItemId); } return $this->objWikiItem; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'PostedByPerson': // Gets the value for the Person object referenced by intPostedByPersonId (Not Null) // @return Person try { if (!$this->objPostedByPerson && !is_null($this->intPostedByPersonId)) { $this->objPostedByPerson = Person::Load($this->intPostedByPersonId); } return $this->objPostedByPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'WikiFile': // Gets the value for the WikiFile object that uniquely references this WikiVersion // by objWikiFile (Unique) // @return WikiFile try { if ($this->objWikiFile === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objWikiFile) { $this->objWikiFile = WikiFile::LoadByWikiVersionId($this->intId); } return $this->objWikiFile; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'WikiImage': // Gets the value for the WikiImage object that uniquely references this WikiVersion // by objWikiImage (Unique) // @return WikiImage try { if ($this->objWikiImage === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objWikiImage) { $this->objWikiImage = WikiImage::LoadByWikiVersionId($this->intId); } return $this->objWikiImage; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'WikiItemAsCurrent': // Gets the value for the WikiItem object that uniquely references this WikiVersion // by objWikiItemAsCurrent (Unique) // @return WikiItem try { if ($this->objWikiItemAsCurrent === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objWikiItemAsCurrent) { $this->objWikiItemAsCurrent = WikiItem::LoadByCurrentWikiVersionId($this->intId); } return $this->objWikiItemAsCurrent; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'WikiPage': // Gets the value for the WikiPage object that uniquely references this WikiVersion // by objWikiPage (Unique) // @return WikiPage try { if ($this->objWikiPage === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objWikiPage) { $this->objWikiPage = WikiPage::LoadByWikiVersionId($this->intId); } return $this->objWikiPage; } 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; } } }