getDoneFlags() public static method

Return done flags used to tell how the archiving process for a specific archive was completed,
public static getDoneFlags ( array $plugins, Segment $segment ) : array
$plugins array
$segment Piwik\Segment
return array
コード例 #1
0
 /**
  * Returns the SQL condition used to find successfully completed archives that
  * this instance is querying for.
  *
  * @param array $plugins
  * @param Segment $segment
  * @param bool $isSkipAggregationOfSubTables
  * @return string
  */
 private static function getNameCondition(array $plugins, Segment $segment, $isSkipAggregationOfSubTables)
 {
     // the flags used to tell how the archiving process for a specific archive was completed,
     // if it was completed
     $doneFlags = Rules::getDoneFlags($plugins, $segment, $isSkipAggregationOfSubTables);
     $allDoneFlags = "'" . implode("','", $doneFlags) . "'";
     $possibleValues = array(ArchiveWriter::DONE_OK, ArchiveWriter::DONE_OK_TEMPORARY);
     if (!Rules::isRequestAuthorizedToArchive()) {
         //If request is not authorized to archive then fetch also invalidated archives
         $possibleValues[] = ArchiveWriter::DONE_INVALIDATED;
     }
     // create the SQL to find archives that are DONE
     return "((name IN ({$allDoneFlags})) AND " . " (value IN (" . implode(',', $possibleValues) . ")))";
 }
コード例 #2
0
ファイル: ArchiveSelector.php プロジェクト: carriercomm/piwik
 /**
  * Returns the SQL condition used to find successfully completed archives that
  * this instance is querying for.
  *
  * @param array $plugins
  * @param Segment $segment
  * @param bool $isSkipAggregationOfSubTables
  * @return string
  */
 private static function getNameCondition(array $plugins, Segment $segment, $isSkipAggregationOfSubTables)
 {
     // the flags used to tell how the archiving process for a specific archive was completed,
     // if it was completed
     $doneFlags = Rules::getDoneFlags($plugins, $segment, $isSkipAggregationOfSubTables);
     $allDoneFlags = "'" . implode("','", $doneFlags) . "'";
     // create the SQL to find archives that are DONE
     return "((name IN ({$allDoneFlags})) AND " . " (value = '" . ArchiveWriter::DONE_OK . "' OR " . " value = '" . ArchiveWriter::DONE_OK_TEMPORARY . "'))";
 }
コード例 #3
0
 /**
  * Returns the SQL condition used to find successfully completed archives that
  * this instance is querying for.
  *
  * @param array $plugins
  * @param Segment $segment
  * @param bool $isSkipAggregationOfSubTables
  * @return string
  */
 private static function getDoneFlags(array $plugins, Segment $segment, $isSkipAggregationOfSubTables)
 {
     // the flags used to tell how the archiving process for a specific archive was completed,
     // if it was completed
     $doneFlags = Rules::getDoneFlags($plugins, $segment, $isSkipAggregationOfSubTables);
     return $doneFlags;
 }
コード例 #4
0
ファイル: ArchiveSelector.php プロジェクト: bossrabbit/piwik
 /**
  * Returns the SQL condition used to find successfully completed archives that
  * this instance is querying for.
  *
  * @param array $plugins
  * @param Segment $segment
  * @return string
  */
 private static function getNameCondition(array $plugins, Segment $segment)
 {
     // the flags used to tell how the archiving process for a specific archive was completed,
     // if it was completed
     $doneFlags = Rules::getDoneFlags($plugins, $segment);
     $allDoneFlags = "'" . implode("','", $doneFlags) . "'";
     $possibleValues = Rules::getSelectableDoneFlagValues();
     // create the SQL to find archives that are DONE
     return "((name IN ({$allDoneFlags})) AND (value IN (" . implode(',', $possibleValues) . ")))";
 }