Beispiel #1
0
 /**
  * Function to check if current cache is part of any PowerTrail.
  * On success PowerTrail object is created.
  *
  * @return boolean true if this cache belongs to any PowerTrail;
  */
 public function isPowerTrailPart()
 {
     if (!OcConfig::instance()->getPowerTrailModuleSwitchOn()) {
         return false;
     }
     if (is_null($this->isPowerTrailPart)) {
         $ptArr = PowerTrail::CheckForPowerTrailByCache($this->id);
         if (count($ptArr) > 0) {
             // TODO: ASSUMPTION: cache belongs to ONLY one PT
             $this->isPowerTrailPart = true;
             $this->powerTrail = new PowerTrail(array('dbRow' => $ptArr[0]));
         } else {
             $this->isPowerTrailPart = false;
         }
     }
     return $this->isPowerTrailPart;
 }