diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-08-02 17:59:33 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-08-02 17:59:33 +0400 |
commit | a96ec40e983a8b64f4c25def541a519ff3670e6a (patch) | |
tree | bef2a5f7b1e9532dc96161334e23a553cdff7ea1 /plugins/VisitorInterest/API.php | |
parent | 61997f45e4c39360000e815c9e0853ae04e2f56f (diff) |
Refs #4059 Converting dozens of plugins/* classes to use Namespaces, \Piwik\Plugins\*
Added namespaces to functions.php files in the five plugins that had one
Work in progress
Diffstat (limited to 'plugins/VisitorInterest/API.php')
-rw-r--r-- | plugins/VisitorInterest/API.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/VisitorInterest/API.php b/plugins/VisitorInterest/API.php index 8f34623fec..7a6f925254 100644 --- a/plugins/VisitorInterest/API.php +++ b/plugins/VisitorInterest/API.php @@ -6,20 +6,23 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * * @category Piwik_Plugins - * @package Piwik_VisitorInterest + * @package VisitorInterest */ +namespace Piwik\Plugins\VisitorInterest; + use Piwik\Archive; use Piwik\Metrics; use Piwik\Piwik; use Piwik\DataTable; +use Piwik\Plugins\VisitorInterest\Archiver; /** * VisitorInterest API lets you access two Visitor Engagement reports: number of visits per number of pages, * and number of visits per visit duration. * - * @package Piwik_VisitorInterest + * @package VisitorInterest */ -class Piwik_VisitorInterest_API +class API { static private $instance = null; @@ -42,7 +45,7 @@ class Piwik_VisitorInterest_API public function getNumberOfVisitsPerVisitDuration($idSite, $period, $date, $segment = false) { - $dataTable = $this->getDataTable(Piwik_VisitorInterest_Archiver::TIME_SPENT_RECORD_NAME, $idSite, $period, $date, $segment); + $dataTable = $this->getDataTable(Archiver::TIME_SPENT_RECORD_NAME, $idSite, $period, $date, $segment); $dataTable->queueFilter('Sort', array('label', 'asc', true)); $dataTable->queueFilter('BeautifyTimeRangeLabels', array( Piwik_Translate('VisitorInterest_BetweenXYSeconds'), @@ -53,7 +56,7 @@ class Piwik_VisitorInterest_API public function getNumberOfVisitsPerPage($idSite, $period, $date, $segment = false) { - $dataTable = $this->getDataTable(Piwik_VisitorInterest_Archiver::PAGES_VIEWED_RECORD_NAME, $idSite, $period, $date, $segment); + $dataTable = $this->getDataTable(Archiver::PAGES_VIEWED_RECORD_NAME, $idSite, $period, $date, $segment); $dataTable->queueFilter('Sort', array('label', 'asc', true)); $dataTable->queueFilter('BeautifyRangeLabels', array( Piwik_Translate('VisitorInterest_OnePage'), @@ -74,7 +77,7 @@ class Piwik_VisitorInterest_API public function getNumberOfVisitsByDaysSinceLast($idSite, $period, $date, $segment = false) { $dataTable = $this->getDataTable( - Piwik_VisitorInterest_Archiver::DAYS_SINCE_LAST_RECORD_NAME, $idSite, $period, $date, $segment, Metrics::INDEX_NB_VISITS); + Archiver::DAYS_SINCE_LAST_RECORD_NAME, $idSite, $period, $date, $segment, Metrics::INDEX_NB_VISITS); $dataTable->queueFilter('BeautifyRangeLabels', array(Piwik_Translate('General_OneDay'), Piwik_Translate('General_NDays'))); return $dataTable; } @@ -92,7 +95,7 @@ class Piwik_VisitorInterest_API public function getNumberOfVisitsByVisitCount($idSite, $period, $date, $segment = false) { $dataTable = $this->getDataTable( - Piwik_VisitorInterest_Archiver::VISITS_COUNT_RECORD_NAME, $idSite, $period, $date, $segment, Metrics::INDEX_NB_VISITS); + Archiver::VISITS_COUNT_RECORD_NAME, $idSite, $period, $date, $segment, Metrics::INDEX_NB_VISITS); $dataTable->queueFilter('BeautifyRangeLabels', array( Piwik_Translate('General_OneVisit'), Piwik_Translate('General_NVisits'))); |