コード例 #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 'Path':
             // Gets the value for strPath (Not Null)
             // @return string
             return $this->strPath;
         case 'WikiItemTypeId':
             // Gets the value for intWikiItemTypeId (Not Null)
             // @return integer
             return $this->intWikiItemTypeId;
         case 'EditorMinimumPersonTypeId':
             // Gets the value for intEditorMinimumPersonTypeId (Not Null)
             // @return integer
             return $this->intEditorMinimumPersonTypeId;
         case 'OverrideNavbarIndex':
             // Gets the value for intOverrideNavbarIndex
             // @return integer
             return $this->intOverrideNavbarIndex;
         case 'OverrideSubnavIndex':
             // Gets the value for intOverrideSubnavIndex
             // @return integer
             return $this->intOverrideSubnavIndex;
         case 'CurrentWikiVersionId':
             // Gets the value for intCurrentWikiVersionId (Unique)
             // @return integer
             return $this->intCurrentWikiVersionId;
         case 'CurrentName':
             // Gets the value for strCurrentName
             // @return string
             return $this->strCurrentName;
         case 'CurrentPostedByPersonId':
             // Gets the value for intCurrentPostedByPersonId
             // @return integer
             return $this->intCurrentPostedByPersonId;
         case 'CurrentPostDate':
             // Gets the value for dttCurrentPostDate
             // @return QDateTime
             return $this->dttCurrentPostDate;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'CurrentWikiVersion':
             // Gets the value for the WikiVersion object referenced by intCurrentWikiVersionId (Unique)
             // @return WikiVersion
             try {
                 if (!$this->objCurrentWikiVersion && !is_null($this->intCurrentWikiVersionId)) {
                     $this->objCurrentWikiVersion = WikiVersion::Load($this->intCurrentWikiVersionId);
                 }
                 return $this->objCurrentWikiVersion;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'CurrentPostedByPerson':
             // Gets the value for the Person object referenced by intCurrentPostedByPersonId
             // @return Person
             try {
                 if (!$this->objCurrentPostedByPerson && !is_null($this->intCurrentPostedByPersonId)) {
                     $this->objCurrentPostedByPerson = Person::Load($this->intCurrentPostedByPersonId);
                 }
                 return $this->objCurrentPostedByPerson;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'TopicLink':
             // Gets the value for the TopicLink object that uniquely references this WikiItem
             // by objTopicLink (Unique)
             // @return TopicLink
             try {
                 if ($this->objTopicLink === false) {
                     // We've attempted early binding -- and the reverse reference object does not exist
                     return null;
                 }
                 if (!$this->objTopicLink) {
                     $this->objTopicLink = TopicLink::LoadByWikiItemId($this->intId);
                 }
                 return $this->objTopicLink;
             } 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 '_WikiVersion':
             // Gets the value for the private _objWikiVersion (Read-Only)
             // if set due to an expansion on the wiki_version.wiki_item_id reverse relationship
             // @return WikiVersion
             return $this->_objWikiVersion;
         case '_WikiVersionArray':
             // Gets the value for the private _objWikiVersionArray (Read-Only)
             // if set due to an ExpandAsArray on the wiki_version.wiki_item_id reverse relationship
             // @return WikiVersion[]
             return (array) $this->_objWikiVersionArray;
         case '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }