diff options
author | robocoder <anthon.pang@gmail.com> | 2009-08-22 17:23:16 +0400 |
---|---|---|
committer | robocoder <anthon.pang@gmail.com> | 2009-08-22 17:23:16 +0400 |
commit | 20cac9adab214fe1e8e8a37f0cf81ec28c7968fa (patch) | |
tree | 436d3d9c8546deb59b8f307dd5b20cd1a60d407f /core/Tracker | |
parent | 6eb358f25786a76f3dfcd52f40304a515cf98411 (diff) |
phpdoc cleanup:
* add @category (Piwik => 'core', Piwik_Plugins => 'plugins')
* in core, use @package and @subpackage more consistently to group files/classes; exception is DataFiles/*, PluginsFunctions/*, and SmartyPlugins/*
* in plugins, @package is the plugin name
* removed '@param none' -- not a phpdoc convention
* '@throws' and '@return void' are also not phpdoc conventions, but are widely used elsewhere, e.g., Smarty & Zend
git-svn-id: http://dev.piwik.org/svn/trunk@1420 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Tracker')
-rw-r--r-- | core/Tracker/Action.php | 12 | ||||
-rw-r--r-- | core/Tracker/Config.php | 6 | ||||
-rw-r--r-- | core/Tracker/Db.php | 10 | ||||
-rw-r--r-- | core/Tracker/Generator.php | 30 | ||||
-rw-r--r-- | core/Tracker/Generator/Tracker.php | 11 | ||||
-rw-r--r-- | core/Tracker/Generator/Visit.php | 11 | ||||
-rw-r--r-- | core/Tracker/GoalManager.php | 7 | ||||
-rw-r--r-- | core/Tracker/Visit.php | 29 |
8 files changed, 57 insertions, 59 deletions
diff --git a/core/Tracker/Action.php b/core/Tracker/Action.php index eb2bf13f8e..abfbb0472a 100644 --- a/core/Tracker/Action.php +++ b/core/Tracker/Action.php @@ -6,14 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Tracker + * @category Piwik + * @package Piwik */ /** * Interface of the Action object. * New Action classes can be defined in plugins and used instead of the default one. * - * @package Piwik_Tracker + * @package Piwik + * @subpackage Piwik_Tracker */ interface Piwik_Tracker_Action_Interface { const TYPE_ACTION = 1; @@ -50,8 +52,8 @@ interface Piwik_Tracker_Action_Interface { * PLUGIN_IDEA - An action is associated to URLs and link to the URL from the reports (currently actions do not link to the url of the pages) * PLUGIN_IDEA - An action hit by a visitor is associated to the HTML title of the page that triggered the action and this HTML title is displayed in the interface * - * - * @package Piwik_Tracker + * @package Piwik + * @subpackage Piwik_Tracker */ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface { @@ -207,8 +209,6 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface /** * Generates the name of the action from the URL or the specified name. * Sets the name as $this->actionName - * - * @return void */ protected function extractUrlAndActionNameFromRequest() { diff --git a/core/Tracker/Config.php b/core/Tracker/Config.php index f954acff1a..68feeb5bcc 100644 --- a/core/Tracker/Config.php +++ b/core/Tracker/Config.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Tracker + * @category Piwik + * @package Piwik */ /** @@ -19,7 +20,8 @@ * It's using the php.net/parse_ini_file function to parse the configuration files. * It can be used to access both user config.ini.php and piwik global.ini.php config file. * - * @package Piwik_Tracker + * @package Piwik + * @subpackage Piwik_Tracker */ class Piwik_Tracker_Config { diff --git a/core/Tracker/Db.php b/core/Tracker/Db.php index ba179889ae..49dcc57745 100644 --- a/core/Tracker/Db.php +++ b/core/Tracker/Db.php @@ -6,15 +6,17 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Tracker + * @category Piwik + * @package Piwik */ /** * Simple database PDO wrapper. * We can't afford to have a dependency with the Zend_Db module in Tracker. * We wrote this simple class - * - * @package Piwik_Tracker + * + * @package Piwik + * @subpackage Piwik_Tracker */ class Piwik_Tracker_Db { @@ -110,8 +112,6 @@ class Piwik_Tracker_Db /** * Disconnects from the Mysql server - * - * @return void */ public function disconnect() { diff --git a/core/Tracker/Generator.php b/core/Tracker/Generator.php index 2aaf7fb723..1b780cb07a 100644 --- a/core/Tracker/Generator.php +++ b/core/Tracker/Generator.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Tracker + * @category Piwik + * @package Piwik */ /** @@ -30,14 +31,12 @@ * - action_name * - HTML title * - * - * @package Piwik_Tracker - * @subpackage Piwik_Tracker_Generator + * @package Piwik + * @subpackage Piwik_Tracker * * "Le Generator, il est trop Fort!" * - Random fan */ - class Piwik_Tracker_Generator { /** @@ -180,7 +179,6 @@ class Piwik_Tracker_Generator * * @param string Name of the parameter _GET[$name] * @param array|mixed Value of the parameter - * @return void */ protected function addParam( $name, $aValue) { @@ -198,8 +196,6 @@ class Piwik_Tracker_Generator /** * TRUNCATE all logs related tables to start a fresh logging database. * Be careful, any data deleted this way is deleted forever - * - * @return void */ public function emptyAllLogTables() { @@ -221,8 +217,6 @@ class Piwik_Tracker_Generator /** * This is called at the end of the Generator script. * Calls the Profiler output if the profiler is enabled. - * - * @return void */ public function end() { @@ -241,8 +235,6 @@ class Piwik_Tracker_Generator * 'color', 'hour', 'minute', etc. * - load from DataFiles and setup values for the other parameters such as UserAgent, Referers, AcceptedLanguages, etc. * @see /misc/generateVisitsData/ - * - * @return void */ public function init() { @@ -321,8 +313,6 @@ class Piwik_Tracker_Generator /** * If the SQL profiler is enabled and if the reinit at every request is set to true, * then we TRUNCATE the profiling information so that we only profile one visitor at a time - * - * @return void */ protected function initProfiler() { @@ -373,8 +363,6 @@ class Piwik_Tracker_Generator * Also generates a random IP. * * We change the superglobal values of HTTP_USER_AGENT, HTTP_CLIENT_IP, HTTP_ACCEPT_LANGUAGE to the generated value. - * - * @return void */ protected function generateNewVisit() { @@ -407,9 +395,6 @@ class Piwik_Tracker_Generator * We generate a new Referer, that would be read in the case the visit last page is older than 30 minutes. * * This function tries to generate actions that use the features of Piwik (campaigns, downloads, outlinks, action_name set in the JS tag, etc.) - * - * @return void - * */ protected function generateActionVisit() { @@ -578,8 +563,6 @@ class Piwik_Tracker_Generator * @see setCurrentRequest() * This method is called once the current action parameters array has been generated from * the global parameters array - * - * @return void */ protected function setFakeRequest() { @@ -636,8 +619,6 @@ class Piwik_Tracker_Generator * - load the Tracker class and call the method to launch the recording * * This will save the visit in the database - * - * @return void */ protected function saveVisit() { @@ -645,6 +626,5 @@ class Piwik_Tracker_Generator $process = new Piwik_Tracker_Generator_Tracker(); $process->main(); unset($process); - } - + } } diff --git a/core/Tracker/Generator/Tracker.php b/core/Tracker/Generator/Tracker.php index 0bff866e2a..92bd002d59 100644 --- a/core/Tracker/Generator/Tracker.php +++ b/core/Tracker/Generator/Tracker.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Tracker + * @category Piwik + * @package Piwik */ /** @@ -15,15 +16,13 @@ * - doesn't print the 1pixel transparent GIF at the end of the visit process * - overwrite the Tracker Visit object to use so we use our own Tracker_visit @see Piwik_Tracker_Generator_Visit * - * @package Piwik_Tracker - * @subpackage Piwik_Tracker_Generator + * @package Piwik + * @subpackage Piwik_Tracker */ class Piwik_Tracker_Generator_Tracker extends Piwik_Tracker { /** * Does nothing instead of sending headers - * - * @return void */ protected function sendHeader($header) { @@ -31,8 +30,6 @@ class Piwik_Tracker_Generator_Tracker extends Piwik_Tracker /** * Does nothing instead of displaying a 1x1 transparent pixel GIF - * - * @return void */ protected function end() { diff --git a/core/Tracker/Generator/Visit.php b/core/Tracker/Generator/Visit.php index 9d6f8c6043..2937ebfe0d 100644 --- a/core/Tracker/Generator/Visit.php +++ b/core/Tracker/Generator/Visit.php @@ -6,16 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Tracker + * @category Piwik + * @package Piwik */ /** * Fake Piwik_Tracker_Visit class that overwrite all the Time related method to be able * to setup a given timestamp for the generated visitor and actions. * - * - * @package Piwik_Tracker - * @subpackage Piwik_Tracker_Generator + * @package Piwik + * @subpackage Piwik_Tracker */ class Piwik_Tracker_Generator_Visit extends Piwik_Tracker_Visit { @@ -40,6 +40,5 @@ class Piwik_Tracker_Generator_Visit extends Piwik_Tracker_Visit protected function updateCookie() { @parent::updateCookie(); - } - + } } diff --git a/core/Tracker/GoalManager.php b/core/Tracker/GoalManager.php index a338436024..1208ce60a1 100644 --- a/core/Tracker/GoalManager.php +++ b/core/Tracker/GoalManager.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Tracker + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_Tracker + */ class Piwik_Tracker_GoalManager { /** diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php index 67679fd815..2bb887bccc 100644 --- a/core/Tracker/Visit.php +++ b/core/Tracker/Visit.php @@ -6,10 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Tracker + * @category Piwik + * @package Piwik */ - +/** + * @package Piwik + * @subpackage Piwik_Tracker + */ interface Piwik_Tracker_Visit_Interface { function setRequest($requestArray); function handle(); @@ -26,9 +30,9 @@ interface Piwik_Tracker_Visit_Interface { * Whether a visit is NEW or KNOWN we also save the action in the DB. * One request to the piwik.php script is associated to one action. * - * @package Piwik_Tracker + * @package Piwik + * @subpackage Piwik_Tracker */ - class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface { /** @@ -335,9 +339,6 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface /** * Save new visitor information to log_visit table. * Provides pre- and post- event hooks (Tracker.saveVisitorInformation and Tracker.saveVisitorInformation.end) for plugins - * - * @param none - * @return void */ protected function saveVisitorInformation() { @@ -369,6 +370,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface /** * Returns vistor cookie + * * @return string */ protected function getVisitorIdcookie() @@ -388,6 +390,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface /** * Returns the current date in the "Y-m-d" PHP format + * * @return string */ protected function getCurrentDate( $format = "Y-m-d") @@ -397,6 +400,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface /** * Returns the current Timestamp + * * @return int */ protected function getCurrentTimestamp() @@ -428,6 +432,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface /** * Returns the cookie name used for the Piwik Tracker cookie + * * @return string */ protected function getCookieName() @@ -437,6 +442,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface /** * Returns the cookie expiration date. + * * @return int */ protected function getCookieExpire() @@ -950,7 +956,16 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface } } +/** + * @package Piwik + * @subpackage Piwik_Tracker + */ class Piwik_Tracker_Visit_VisitorNotFoundInDatabase extends Exception { } + +/** + * @package Piwik + * @subpackage Piwik_Tracker + */ class Piwik_Tracker_Visit_Excluded extends Exception { } |