diff --git a/core/Db/Adapter.php b/core/Db/Adapter.php index 26c796cac991aa3186449a0c82f62b2ea64cfb05..88c4ba2df2fe8d9870a94e66ee5e48617ff73f4c 100644 --- a/core/Db/Adapter.php +++ b/core/Db/Adapter.php @@ -128,66 +128,3 @@ class Piwik_Db_Adapter return $adapters; } } - -/** - * @package Piwik - * @subpackage Piwik_Db - */ -interface Piwik_Db_Adapter_Interface -{ - /** - * Reset the configuration variables in this adapter. - */ - public function resetConfig(); - - /** - * Return default port. - * - * @return int - */ - public static function getDefaultPort(); - - /** - * Check database server version - * - * @throws Exception if database version is less than required version - */ - public function checkServerVersion(); - - /** - * Returns true if this adapter's required extensions are enabled - * - * @return bool - */ - public static function isEnabled(); - - /** - * Returns true if this adapter supports blobs as fields - * - * @return bool - */ - public function hasBlobDataType(); - - /** - * Returns true if this adapter supports bulk loading - * - * @return bool - */ - public function hasBulkLoader(); - - /** - * Test error number - * - * @param Exception $e - * @param string $errno - * @return bool - */ - public function isErrNo($e, $errno); - - /** - * Is the connection character set equal to utf8? - * - * @return bool - */ - public function isConnectionUTF8(); -} diff --git a/core/Db/Adapter/Interface.php b/core/Db/Adapter/Interface.php new file mode 100644 index 0000000000000000000000000000000000000000..8bde7c024c712801e6df62e12fa778bb0bbeb0b4 --- /dev/null +++ b/core/Db/Adapter/Interface.php @@ -0,0 +1,74 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * @version $Id: Adapter.php 6109 2012-03-24 11:49:29Z vipsoft $ + * + * @category Piwik + * @package Piwik + */ + +/** + * @package Piwik + * @subpackage Piwik_Db + */ +interface Piwik_Db_Adapter_Interface +{ + /** + * Reset the configuration variables in this adapter. + */ + public function resetConfig(); + + /** + * Return default port. + * + * @return int + */ + public static function getDefaultPort(); + + /** + * Check database server version + * + * @throws Exception if database version is less than required version + */ + public function checkServerVersion(); + + /** + * Returns true if this adapter's required extensions are enabled + * + * @return bool + */ + public static function isEnabled(); + + /** + * Returns true if this adapter supports blobs as fields + * + * @return bool + */ + public function hasBlobDataType(); + + /** + * Returns true if this adapter supports bulk loading + * + * @return bool + */ + public function hasBulkLoader(); + + /** + * Test error number + * + * @param Exception $e + * @param string $errno + * @return bool + */ + public function isErrNo($e, $errno); + + /** + * Is the connection character set equal to utf8? + * + * @return bool + */ + public function isConnectionUTF8(); +} diff --git a/core/Plugin.php b/core/Plugin.php index d2de582cdac77a5a5e09ad8f3df378cd8355ee90..9770523f73eea635fe9a644d1f637875b738fd32 100644 --- a/core/Plugin.php +++ b/core/Plugin.php @@ -30,13 +30,13 @@ abstract class Piwik_Plugin * - 'translationAvailable' => bool // is there a translation file in plugins/your-plugin/lang/* ? * - 'TrackerPlugin' => bool // should we load this plugin during the stats logging process? */ - abstract function getInformation(); + abstract public function getInformation(); /** * Returns the list of hooks registered with the methods names * @return array */ - function getListHooksRegistered() + public function getListHooksRegistered() { return array(); } diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php index 9e9f27951509316f89212606e34a58a53f1ed621..7f132494d70f671415398688f6ed49b8a3bb2c6b 100644 --- a/plugins/Actions/Actions.php +++ b/plugins/Actions/Actions.php @@ -39,7 +39,7 @@ class Piwik_Actions extends Piwik_Plugin return $info; } - function getListHooksRegistered() + public function getListHooksRegistered() { $hooks = array( 'ArchiveProcessing_Day.compute' => 'archiveDay', @@ -568,7 +568,17 @@ class Piwik_Actions extends Piwik_Plugin // Record the final datasets $this->archiveDayRecordInDatabase($archiveProcessing); } - + + /** + * @param $select + * @param $from + * @param $where + * @param $orderBy + * @param $groupBy + * @param $sprintfField + * @param Piwik_ArchiveProcessing $archiveProcessing + * @return int + */ protected function archiveDayQueryProcess($select, $from, $where, $orderBy, $groupBy, $sprintfField, $archiveProcessing) { @@ -760,7 +770,12 @@ class Piwik_Actions extends Piwik_Plugin const CACHE_PARSED_INDEX_NAME = 0; const CACHE_PARSED_INDEX_TYPE = 1; static $cacheParsedAction = array(); - + + /** + * @param Zend_Db_Statement|PDOStatement $query + * @param string|bool $fieldQueried + * @return int + */ protected function updateActionsTableWithRowQuery($query, $fieldQueried = false) { $rowsProcessed = 0;