diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-07-20 11:09:46 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-07-20 11:09:46 +0400 |
commit | 0a63210e3eae7562af1a3dbee340eb1ee140db3d (patch) | |
tree | c9f7c3a36a4b344b25c12aa04fed0733efb3bfa0 /core/Archive.php | |
parent | 7ca35544d15cdb41b17283e693c8a14777c923ad (diff) |
Converting to namespace: Period*, Metrics, Segment, SegmentExpression, PluginsManager
Diffstat (limited to 'core/Archive.php')
-rw-r--r-- | core/Archive.php | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/core/Archive.php b/core/Archive.php index 5ba77c6523..ddc0cb453e 100644 --- a/core/Archive.php +++ b/core/Archive.php @@ -10,6 +10,7 @@ */ namespace Piwik; use Piwik\Piwik; +use Piwik\Metrics; /** * The archive object is used to query specific data for a day or a period of statistics for a given website. @@ -92,16 +93,16 @@ class Archive private $forceIndexedByDate; /** - * @var Piwik_Archive_Parameters + * @var Archive_Parameters */ private $params; /** - * @param Piwik_Archive_Parameters $params + * @param Archive_Parameters $params * @param bool $forceIndexedBySite Whether to force index the result of a query by site ID. * @param bool $forceIndexedByDate Whether to force index the result of a query by period. */ - protected function __construct(Piwik_Archive_Parameters $params, $forceIndexedBySite = false, + protected function __construct(Archive_Parameters $params, $forceIndexedBySite = false, $forceIndexedByDate = false) { $this->params = $params; @@ -125,20 +126,20 @@ class Archive $websiteIds = Site::getIdSitesFromIdSitesString($idSites, $_restrictSitesToLogin); if (Period::isMultiplePeriod($strDate, $period)) { - $oPeriod = new Piwik_Period_Range($period, $strDate); + $oPeriod = new Period_Range($period, $strDate); $allPeriods = $oPeriod->getSubperiods(); } else { $timezone = count($websiteIds) == 1 ? Site::getTimezoneFor($websiteIds[0]) : false; $oPeriod = Period::makePeriodFromQueryParams($timezone, $period, $strDate); $allPeriods = array($oPeriod); } - $segment = new Piwik_Segment($segment, $websiteIds); + $segment = new Segment($segment, $websiteIds); $idSiteIsAll = $idSites == self::REQUEST_ALL_WEBSITES_FLAG; $isMultipleDate = Period::isMultiplePeriod($strDate, $period); return Archive::factory($segment, $allPeriods, $websiteIds, $idSiteIsAll, $isMultipleDate); } - public static function factory(Piwik_Segment $segment, array $periods, $idSites, $idSiteIsAll = false, $isMultipleDate = false) + public static function factory(Segment $segment, array $periods, $idSites, $idSiteIsAll = false, $isMultipleDate = false) { $forceIndexedBySite = false; $forceIndexedByDate = false; @@ -149,7 +150,7 @@ class Archive $forceIndexedByDate = true; } - $params = new Piwik_Archive_Parameters(); + $params = new Archive_Parameters(); $params->setIdSites($idSites); $params->setPeriods($periods); $params->setSegment($segment); @@ -314,7 +315,7 @@ class Archive * @param array|string $archiveNames * @param $archiveDataType * @param null|int $idSubtable - * @return Piwik_Archive_DataCollection + * @return Archive_DataCollection */ private function get($archiveNames, $archiveDataType, $idSubtable = null) { @@ -331,7 +332,7 @@ class Archive } } - $result = new Piwik_Archive_DataCollection( + $result = new Archive_DataCollection( $archiveNames, $archiveDataType, $this->params->getIdSites(), $this->params->getPeriods(), $defaultRow = null); $archiveIds = $this->getArchiveIds($archiveNames); @@ -412,7 +413,7 @@ class Archive } /** - * @return Piwik_Archive_Parameters + * @return Archive_Parameters */ public function getParams() { @@ -528,7 +529,7 @@ class Archive /** * Returns an array describing what metadata to use when indexing a query result. - * For use with Piwik_Archive_DataCollection. + * For use with Archive_DataCollection. * * @return array */ @@ -627,7 +628,7 @@ class Archive public static function getPluginForReport($report) { // Core metrics are always processed in Core, for the requested date/period/segment - if (in_array($report, Piwik_Metrics::getVisitsMetricNames())) { + if (in_array($report, Metrics::getVisitsMetricNames())) { $report = 'VisitsSummary_CoreMetrics'; } // Goal_* metrics are processed by the Goals plugin (HACK) else if (strpos($report, 'Goal_') === 0) { |