Exemplo n.º 1
0
 /**
  * Returns the minimum archive processed datetime to look at. Only public for tests.
  *
  * @return int|bool  Datetime timestamp, or false if must look at any archive available
  */
 protected function getMinTimeArchiveProcessed()
 {
     $endDateTimestamp = self::determineIfArchivePermanent($this->params->getDateEnd());
     $isArchiveTemporary = $endDateTimestamp === false;
     $this->temporaryArchive = $isArchiveTemporary;
     if ($endDateTimestamp) {
         // Permanent archive
         return $endDateTimestamp;
     }
     // Temporary archive
     return Rules::getMinTimeProcessedForTemporaryArchive($this->params->getDateStart(), $this->params->getPeriod(), $this->params->getSegment(), $this->params->getSite());
 }
Exemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param \Piwik\ArchiveProcessor\Parameters $params
  */
 public function __construct(Parameters $params)
 {
     $this->dateStart = $params->getDateStart();
     $this->dateEnd = $params->getDateEnd();
     $this->segment = $params->getSegment();
     $this->sites = $params->getIdSites();
 }