/**
  * 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 'TermTaxonomyId':
             /**
              * Gets the value for intTermTaxonomyId (Read-Only PK)
              * @return integer
              */
             return $this->intTermTaxonomyId;
         case 'TermId':
             /**
              * Gets the value for intTermId (Not Null)
              * @return integer
              */
             return $this->intTermId;
         case 'Taxonomy':
             /**
              * Gets the value for strTaxonomy (Not Null)
              * @return string
              */
             return $this->strTaxonomy;
         case 'Description':
             /**
              * Gets the value for strDescription (Not Null)
              * @return string
              */
             return $this->strDescription;
         case 'Parent':
             /**
              * Gets the value for intParent (Not Null)
              * @return integer
              */
             return $this->intParent;
         case 'Count':
             /**
              * Gets the value for intCount (Not Null)
              * @return integer
              */
             return $this->intCount;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'Term':
             /**
              * Gets the value for the WpTerms object referenced by intTermId (Not Null)
              * @return WpTerms
              */
             try {
                 if (!$this->objTerm && !is_null($this->intTermId)) {
                     $this->objTerm = WpTerms::Load($this->intTermId);
                 }
                 return $this->objTerm;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ParentObject':
             /**
              * Gets the value for the WpTermTaxonomy object referenced by intParent (Not Null)
              * @return WpTermTaxonomy
              */
             try {
                 if (!$this->objParentObject && !is_null($this->intParent)) {
                     $this->objParentObject = WpTermTaxonomy::Load($this->intParent);
                 }
                 return $this->objParentObject;
             } 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 '_WpTermRelationshipsAsTermTaxonomy':
             /**
              * Gets the value for the private _objWpTermRelationshipsAsTermTaxonomy (Read-Only)
              * if set due to an expansion on the wp_term_relationships.term_taxonomy_id reverse relationship
              * @return WpTermRelationships
              */
             return $this->_objWpTermRelationshipsAsTermTaxonomy;
         case '_WpTermRelationshipsAsTermTaxonomyArray':
             /**
              * Gets the value for the private _objWpTermRelationshipsAsTermTaxonomyArray (Read-Only)
              * if set due to an ExpandAsArray on the wp_term_relationships.term_taxonomy_id reverse relationship
              * @return WpTermRelationships[]
              */
             return $this->_objWpTermRelationshipsAsTermTaxonomyArray;
         case '_ChildWpTermTaxonomy':
             /**
              * Gets the value for the private _objChildWpTermTaxonomy (Read-Only)
              * if set due to an expansion on the wp_term_taxonomy.parent reverse relationship
              * @return WpTermTaxonomy
              */
             return $this->_objChildWpTermTaxonomy;
         case '_ChildWpTermTaxonomyArray':
             /**
              * Gets the value for the private _objChildWpTermTaxonomyArray (Read-Only)
              * if set due to an ExpandAsArray on the wp_term_taxonomy.parent reverse relationship
              * @return WpTermTaxonomy[]
              */
             return $this->_objChildWpTermTaxonomyArray;
         case '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
Example #2
0
 /**
  * Reload this WpTerms from the database.
  * @return void
  */
 public function Reload()
 {
     // Make sure we are actually Restored from the database
     if (!$this->__blnRestored) {
         throw new QCallerException('Cannot call Reload() on a new, unsaved WpTerms object.');
     }
     $this->DeleteCache();
     // Reload the Object
     $objReloaded = WpTerms::Load($this->intTermId);
     // Update $this's local variables to match
     $this->strName = $objReloaded->strName;
     $this->strSlug = $objReloaded->strSlug;
     $this->intTermGroup = $objReloaded->intTermGroup;
 }