isSegmentPreProcessed() public static method

public static isSegmentPreProcessed ( array $idSites, Segment $segment ) : boolean
$idSites array
$segment Piwik\Segment
return boolean
コード例 #1
0
ファイル: Segment.php プロジェクト: piwik/piwik
 /**
  * Detects whether the Piwik instance is configured to be able to archive this segment. It checks whether the segment
  * will be either archived via browser or cli archiving. It does not check if the segment has been archived. If you
  * want to know whether the segment has been archived, the actual report data needs to be requested.
  *
  * This method does not take any date/period into consideration. Meaning a Piwik instance might be able to archive
  * this segment in general, but not for a certain period if eg the archiving of range dates is disabled.
  *
  * @return bool
  */
 public function willBeArchived()
 {
     if ($this->isEmpty()) {
         return true;
     }
     $idSites = $this->idSites;
     if (!is_array($idSites)) {
         $idSites = array($this->idSites);
     }
     return Rules::isRequestAuthorizedToArchive() || Rules::isBrowserArchivingAvailableForSegments() || Rules::isSegmentPreProcessed($idSites, $this);
 }