Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-07-31 20:46:40 +0400
committermattab <matthieu.aubry@gmail.com>2013-07-31 20:46:40 +0400
commit11752942f0e6526a0d254af2bb2b101491238f29 (patch)
treeb3434b12326b5d84b42312c546c7ec4ee13ab10e /core/Tracker/Db.php
parentd9d4598084aa51d95bf3eab0e961d3c27161cbb8 (diff)
Refs #3741 PHP Namespace conversion continued: Tracker classes,
renaming Unzip to Uncompress, Renaming Tracker/Referer to Tracker/Referrer, and few more
Diffstat (limited to 'core/Tracker/Db.php')
-rw-r--r--core/Tracker/Db.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/core/Tracker/Db.php b/core/Tracker/Db.php
index f917f3ed61..bfb92f34b5 100644
--- a/core/Tracker/Db.php
+++ b/core/Tracker/Db.php
@@ -8,8 +8,13 @@
* @category Piwik
* @package Piwik
*/
+namespace Piwik\Tracker;
+
+use Exception;
+use PDOStatement;
use Piwik\Common;
use Piwik\Timer;
+use Piwik\Tracker\Db\DbException;
/**
* Simple database wrapper.
@@ -19,7 +24,7 @@ use Piwik\Timer;
* @package Piwik
* @subpackage Tracker
*/
-abstract class Piwik_Tracker_Db
+abstract class Db
{
protected static $profiling = false;
@@ -101,7 +106,7 @@ abstract class Piwik_Tracker_Db
$queryProfiling = "INSERT INTO " . Common::prefixTable('log_profiling') . "
(query,count,sum_time_ms) VALUES (?,$count,$time)
- ON DUPLICATE KEY
+ ON DUPLICATE KEY
UPDATE count=count+$count,sum_time_ms=sum_time_ms+$time";
$this->query($queryProfiling, array($query));
}
@@ -113,7 +118,7 @@ abstract class Piwik_Tracker_Db
/**
* Connects to the DB
*
- * @throws Piwik_Tracker_Db_Exception if there was an error connecting the DB
+ * @throws \Piwik\Tracker\Db\DbException if there was an error connecting the DB
*/
abstract public function connect();
@@ -131,7 +136,7 @@ abstract class Piwik_Tracker_Db
* @param string $query Query
* @param array $parameters Parameters to bind
* @see query()
- * @throws Piwik_Tracker_Db_Exception if an exception occurred
+ * @throws \Piwik\Tracker\Db\DbException if an exception occurred
*/
abstract public function fetchAll($query, $parameters = array());
@@ -142,7 +147,7 @@ abstract class Piwik_Tracker_Db
* @param array $parameters Parameters to bind
* @see also query()
*
- * @throws Piwik_Tracker_Db_Exception if an exception occurred
+ * @throws DbException if an exception occurred
*/
abstract public function fetch($query, $parameters = array());
@@ -201,7 +206,7 @@ abstract class Piwik_Tracker_Db
* @param array $parameters Parameters to bind array('idsite'=> 1)
*
* @return PDOStatement or false if failed
- * @throws Piwik_Tracker_Db_Exception if an exception occurred
+ * @throws DbException if an exception occurred
*/
abstract public function query($query, $parameters = array());