diff options
author | sgiehl <stefangiehl@gmail.com> | 2012-06-21 01:01:20 +0400 |
---|---|---|
committer | sgiehl <stefangiehl@gmail.com> | 2012-06-21 01:01:20 +0400 |
commit | c47c83a618f2ecc76f62d371a1091d4b66377ed1 (patch) | |
tree | a22184bdc0b68c356ae46ee81c38a9fd683f49e2 /core/Tracker/Db.php | |
parent | 8705104f303be4b6143db88e5fb060f568f263cf (diff) |
added/fixed doc blocks
git-svn-id: http://dev.piwik.org/svn/trunk@6486 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Tracker/Db.php')
-rw-r--r-- | core/Tracker/Db.php | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/core/Tracker/Db.php b/core/Tracker/Db.php index 48e2eb1703..1c49fed5d1 100644 --- a/core/Tracker/Db.php +++ b/core/Tracker/Db.php @@ -24,6 +24,8 @@ abstract class Piwik_Tracker_Db protected $queriesProfiling = array(); + protected $connection = null; + /** * Enables the SQL profiling. * For each query, saves in the DB the time spent on this query. @@ -68,8 +70,8 @@ abstract class Piwik_Tracker_Db /** * Record query profile * - * @param string $query - * @param Piwik_Timer $timer + * @param string $query + * @param Piwik_Timer $timer */ protected function recordQueryProfile( $query, $timer ) { @@ -127,29 +129,30 @@ abstract class Piwik_Tracker_Db /** * Returns an array containing all the rows of a query result, using optional bound parameters. * - * @param string Query - * @param array Parameters to bind - * @see also query() - * @throws Piwik_Tracker_Db_Exception if an exception occured + * @param string $query Query + * @param array $parameters Parameters to bind + * @see query() + * @throws Piwik_Tracker_Db_Exception if an exception occurred */ abstract public function fetchAll( $query, $parameters = array() ); /** * Returns the first row of a query result, using optional bound parameters. * - * @param string Query - * @param array Parameters to bind + * @param string $query Query + * @param array $parameters Parameters to bind * @see also query() * - * @throws Piwik_Tracker_Db_Exception if an exception occured + * @throws Piwik_Tracker_Db_Exception if an exception occurred */ abstract public function fetch( $query, $parameters = array() ); /** * This function is a proxy to fetch(), used to maintain compatibility with Zend_Db interface + * * @see fetch() - * @param $query - * @param array $parameters + * @param string $query Query + * @param array $parameters Parameters to bind * @return */ public function fetchRow( $query, $parameters = array() ) @@ -159,9 +162,10 @@ abstract class Piwik_Tracker_Db /** * This function is a proxy to fetch(), used to maintain compatibility with Zend_Db interface + * * @see fetch() - * @param string $query - * @param array $parameters + * @param string $query Query + * @param array $parameters Parameters to bind * @return bool|mixed */ public function fetchOne( $query, $parameters = array() ) @@ -172,9 +176,10 @@ abstract class Piwik_Tracker_Db /** * This function is a proxy to fetch(), used to maintain compatibility with Zend_Db + PDO interface + * * @see fetch() - * @param string $query - * @param array $parameters + * @param string $query Query + * @param array $parameters Parameters to bind * @return */ public function exec( $query, $parameters = array() ) @@ -185,7 +190,7 @@ abstract class Piwik_Tracker_Db /** * Return number of affected rows in last query * - * @param mixed $queryResult Result from query() + * @param mixed $queryResult Result from query() * @return int */ abstract public function rowCount($queryResult); @@ -193,11 +198,11 @@ abstract class Piwik_Tracker_Db /** * Executes a query, using optional bound parameters. * - * @param string Query - * @param array|string Parameters to bind array('idsite'=> 1) + * @param string $query Query + * @param array $parameters Parameters to bind array('idsite'=> 1) * * @return PDOStatement or false if failed - * @throws Piwik_Tracker_Db_Exception if an exception occured + * @throws Piwik_Tracker_Db_Exception if an exception occurred */ abstract public function query($query, $parameters = array()); @@ -212,16 +217,9 @@ abstract class Piwik_Tracker_Db /** * Test error number * - * @param Exception $e - * @param string $errno - * @return bool True if error number matches; false otherwise + * @param Exception $e + * @param string $errno + * @return bool True if error number matches; false otherwise */ abstract public function isErrNo($e, $errno); -} - -/** - * @package Piwik - * @subpackage Piwik_Tracker - */ -class Piwik_Tracker_Db_Exception extends Exception { -} +}
\ No newline at end of file |