本文整理汇总了PHP中Piwik\SettingsPiwik::getKnownSegmentsToArchive方法的典型用法代码示例。如果您正苦于以下问题:PHP SettingsPiwik::getKnownSegmentsToArchive方法的具体用法?PHP SettingsPiwik::getKnownSegmentsToArchive怎么用?PHP SettingsPiwik::getKnownSegmentsToArchive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\SettingsPiwik
的用法示例。
在下文中一共展示了SettingsPiwik::getKnownSegmentsToArchive方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSegmentsToProcess
/**
* @param $idSites
* @return array
*/
private static function getSegmentsToProcess($idSites)
{
$knownSegmentsToArchiveAllSites = SettingsPiwik::getKnownSegmentsToArchive();
$segmentsToProcess = $knownSegmentsToArchiveAllSites;
foreach ($idSites as $idSite) {
$segmentForThisWebsite = SettingsPiwik::getKnownSegmentsToArchiveForSite($idSite);
$segmentsToProcess = array_merge($segmentsToProcess, $segmentForThisWebsite);
}
$segmentsToProcess = array_unique($segmentsToProcess);
return $segmentsToProcess;
}
示例2: shouldProcessReportsAllPlugins
public static function shouldProcessReportsAllPlugins(Segment $segment, $periodLabel)
{
if ($segment->isEmpty() && $periodLabel != 'range') {
return true;
}
$segmentsToProcess = SettingsPiwik::getKnownSegmentsToArchive();
if (!empty($segmentsToProcess)) {
// If the requested segment is one of the segments to pre-process
// we ensure that any call to the API will trigger archiving of all reports for this segment
$segment = $segment->getString();
if (in_array($segment, $segmentsToProcess)) {
return true;
}
}
return false;
}
示例3: initSegmentsToArchive
private function initSegmentsToArchive()
{
$segments = \Piwik\SettingsPiwik::getKnownSegmentsToArchive();
if (empty($segments)) {
return array();
}
$this->logger->info("- Will pre-process " . count($segments) . " Segments for each website and each period: " . implode(", ", $segments));
return $segments;
}