diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-06-16 08:31:27 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-06-16 12:11:04 +0400 |
commit | 9eabefaa694c1b004b5044769a269f08f4362c7f (patch) | |
tree | d9cf455341d9319b5b47f9105680f1fd0bd147c7 /core/ArchiveProcessor.php | |
parent | c1576a5e6cf303f8136e690e063c5974a526b1e0 (diff) |
LogAggregator in parent object so we can refactor the Unique Visitors "Period" query
Diffstat (limited to 'core/ArchiveProcessor.php')
-rw-r--r-- | core/ArchiveProcessor.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php index 1f7cd71309..72fd2987e1 100644 --- a/core/ArchiveProcessor.php +++ b/core/ArchiveProcessor.php @@ -103,6 +103,20 @@ abstract class Piwik_ArchiveProcessor $this->segment = $segment; } + protected $logAggregator = null; + + /** + * @return Piwik_DataAccess_LogAggregator + */ + public function getLogAggregator() + { + if(empty($this->logAggregator)) { + $this->logAggregator = new Piwik_DataAccess_LogAggregator( $this->getPeriod()->getDateStart(), $this->getPeriod()->getDateEnd(), + $this->getSite(), $this->getSegment() ); + } + return $this->logAggregator; + } + /** * Returns the minimum archive processed datetime to look at * |