Example #1
0
 /**
  * @return int[] The array of the WP categories for this DLE post.
  */
 public function LoadWpTermsArray()
 {
     $objWpTermsArray = array();
     $intDleCategoryIdArray = explode(",", $this->Category);
     if ($intDleCategoryIdArray) {
         foreach ($intDleCategoryIdArray as $intDleCategoryId) {
             $objDleCategory = DleCategory::Load($intDleCategoryId);
             if (!$objDleCategory) {
                 continue;
             }
             $objWpTerms = $objDleCategory->LoadWpTerms();
             if (!$objWpTerms) {
                 continue;
             }
             $objWpTermsArray[$objWpTerms->TermId] = $objWpTerms;
         }
     }
     return $objWpTermsArray;
 }
 /**
  * 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 'Parentid':
             /**
              * Gets the value for intParentid (Not Null)
              * @return integer
              */
             return $this->intParentid;
         case 'Posi':
             /**
              * Gets the value for intPosi (Not Null)
              * @return integer
              */
             return $this->intPosi;
         case 'Name':
             /**
              * Gets the value for strName (Not Null)
              * @return string
              */
             return $this->strName;
         case 'AltName':
             /**
              * Gets the value for strAltName (Not Null)
              * @return string
              */
             return $this->strAltName;
         case 'Icon':
             /**
              * Gets the value for strIcon (Not Null)
              * @return string
              */
             return $this->strIcon;
         case 'Skin':
             /**
              * Gets the value for strSkin (Not Null)
              * @return string
              */
             return $this->strSkin;
         case 'Descr':
             /**
              * Gets the value for strDescr (Not Null)
              * @return string
              */
             return $this->strDescr;
         case 'Keywords':
             /**
              * Gets the value for strKeywords (Not Null)
              * @return string
              */
             return $this->strKeywords;
         case 'NewsSort':
             /**
              * Gets the value for strNewsSort (Not Null)
              * @return string
              */
             return $this->strNewsSort;
         case 'NewsMsort':
             /**
              * Gets the value for strNewsMsort (Not Null)
              * @return string
              */
             return $this->strNewsMsort;
         case 'NewsNumber':
             /**
              * Gets the value for intNewsNumber (Not Null)
              * @return integer
              */
             return $this->intNewsNumber;
         case 'ShortTpl':
             /**
              * Gets the value for strShortTpl (Not Null)
              * @return string
              */
             return $this->strShortTpl;
         case 'FullTpl':
             /**
              * Gets the value for strFullTpl (Not Null)
              * @return string
              */
             return $this->strFullTpl;
         case 'Metatitle':
             /**
              * Gets the value for strMetatitle (Not Null)
              * @return string
              */
             return $this->strMetatitle;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'ParentidObject':
             /**
              * Gets the value for the DleCategory object referenced by intParentid (Not Null)
              * @return DleCategory
              */
             try {
                 if (!$this->objParentidObject && !is_null($this->intParentid)) {
                     $this->objParentidObject = DleCategory::Load($this->intParentid);
                 }
                 return $this->objParentidObject;
             } 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 '_DleCategoryAsParentid':
             /**
              * Gets the value for the private _objDleCategoryAsParentid (Read-Only)
              * if set due to an expansion on the dle_category.parentid reverse relationship
              * @return DleCategory
              */
             return $this->_objDleCategoryAsParentid;
         case '_DleCategoryAsParentidArray':
             /**
              * Gets the value for the private _objDleCategoryAsParentidArray (Read-Only)
              * if set due to an ExpandAsArray on the dle_category.parentid reverse relationship
              * @return DleCategory[]
              */
             return $this->_objDleCategoryAsParentidArray;
         case '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }