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 | |
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')
143 files changed, 799 insertions, 516 deletions
diff --git a/core/API/DataTableGenericFilter.php b/core/API/DataTableGenericFilter.php index fe5683ae4d..d339a080e7 100644 --- a/core/API/DataTableGenericFilter.php +++ b/core/API/DataTableGenericFilter.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_API + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_API + */ class Piwik_API_DataTableGenericFilter { function __construct( $datatable, $request ) @@ -73,7 +78,6 @@ class Piwik_API_DataTableGenericFilter * Disable this feature by setting the parameter disable_generic_filters to 1 in the API call request. * * @param Piwik_DataTable - * @return void */ protected function applyGenericFilters($datatable) { diff --git a/core/API/DocumentationGenerator.php b/core/API/DocumentationGenerator.php index a21fba77d5..02fc6d49fa 100644 --- a/core/API/DocumentationGenerator.php +++ b/core/API/DocumentationGenerator.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_API + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_API + */ class Piwik_API_DocumentationGenerator { protected $countPluginsLoaded = 0; @@ -193,6 +198,5 @@ class Piwik_API_DocumentationGenerator } $sParameters = implode(", ", $asParameters); return "($sParameters)"; - } - + } } diff --git a/core/API/Proxy.php b/core/API/Proxy.php index 01f5aba449..7bc9dc386e 100644 --- a/core/API/Proxy.php +++ b/core/API/Proxy.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_API + * @category Piwik + * @package Piwik */ /** @@ -17,7 +18,8 @@ * * It will also log the performance of API calls (time spent, parameter values, etc.) if logger available * - * @package Piwik_API + * @package Piwik + * @subpackage Piwik_API */ class Piwik_API_Proxy { diff --git a/core/API/Request.php b/core/API/Request.php index f011dd4bcb..b6d5f09f2a 100644 --- a/core/API/Request.php +++ b/core/API/Request.php @@ -6,8 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * - * @package Piwik_API + * @category Piwik + * @package Piwik */ /** @@ -33,7 +33,8 @@ * echo $result; * * @see http://dev.piwik.org/trac/wiki/API - * @package Piwik_API + * @package Piwik + * @subpackage Piwik_API */ class Piwik_API_Request { diff --git a/core/API/ResponseBuilder.php b/core/API/ResponseBuilder.php index ddcbfdb6e1..a632163108 100644 --- a/core/API/ResponseBuilder.php +++ b/core/API/ResponseBuilder.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_API + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_API + */ class Piwik_API_ResponseBuilder { private $request = null; diff --git a/core/Access.php b/core/Access.php index fe67922039..2485a7658b 100644 --- a/core/Access.php +++ b/core/Access.php @@ -6,8 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik - * */ /** @@ -33,6 +33,7 @@ * and he only can change the main configuration settings. * * @package Piwik + * @subpackage Piwik_Access */ class Piwik_Access { @@ -155,7 +156,12 @@ class Piwik_Access } return true; } - + + /** + * Reload super user access + * + * @return bool + */ protected function reloadAccessSuperUser() { $this->isSuperUser = true; @@ -166,8 +172,6 @@ class Piwik_Access /** * We bypass the normal auth method and give the current user Super User rights. * This should be very carefully used. - * - * @return void */ public function setSuperUser() { @@ -186,6 +190,7 @@ class Piwik_Access /** * Returns the current user login + * * @return string|null */ public function getLogin() @@ -195,6 +200,7 @@ class Piwik_Access /** * Returns the token_auth used to authenticate this user in the API + * * @return string|null */ public function getTokenAuth() @@ -261,6 +267,7 @@ class Piwik_Access /** * If the user doesn't have an ADMIN access for at least one website, throws an exception + * * @throws Exception */ public function checkUserHasSomeAdminAccess() @@ -274,6 +281,7 @@ class Piwik_Access /** * If the user doesn't have any view permission, throw exception + * * @throws Exception */ public function checkUserHasSomeViewAccess() @@ -347,6 +355,7 @@ class Piwik_Access * Exception thrown when a user doesn't have sufficient access. * * @package Piwik + * @subpackage Piwik_Access */ class Piwik_Access_NoAccessException extends Exception {} diff --git a/core/Archive.php b/core/Archive.php index bee74793df..bcc86237a3 100644 --- a/core/Archive.php +++ b/core/Archive.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ diff --git a/core/Archive/Array.php b/core/Archive/Array.php index d82a21c5e8..53063ece02 100644 --- a/core/Archive/Array.php +++ b/core/Archive/Array.php @@ -6,14 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * - * @package Piwik_Archive + * @category Piwik + * @package Piwik */ /** * Piwik_Archive_Array is used to store multiple archives, * for example one archive for a given day for each Piwik website * + * @package Piwik + * @subpackage Piwik_Archive */ abstract class Piwik_Archive_Array extends Piwik_Archive { diff --git a/core/Archive/Array/IndexedByDate.php b/core/Archive/Array/IndexedByDate.php index b4a15e27dd..53a0369153 100644 --- a/core/Archive/Array/IndexedByDate.php +++ b/core/Archive/Array/IndexedByDate.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Archive + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_Archive + */ class Piwik_Archive_Array_IndexedByDate extends Piwik_Archive_Array { /** diff --git a/core/Archive/Array/IndexedBySite.php b/core/Archive/Array/IndexedBySite.php index 57479f2a9e..22cbd88dbd 100644 --- a/core/Archive/Array/IndexedBySite.php +++ b/core/Archive/Array/IndexedBySite.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Archive + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_Archive + */ class Piwik_Archive_Array_IndexedBySite extends Piwik_Archive_Array { /** diff --git a/core/Archive/Single.php b/core/Archive/Single.php index e0eae6257d..52b3f7c7e9 100644 --- a/core/Archive/Single.php +++ b/core/Archive/Single.php @@ -7,13 +7,16 @@ * @version $Id$ * * - * @package Piwik_Archive + * @category Piwik + * @package Piwik */ /** * Piwik_Archive_Single is used to store the data of a single archive, * for example the statistics for the 'day' '2008-02-21' for the website idSite '2' * + * @package Piwik + * @subpackage Piwik_Archive */ class Piwik_Archive_Single extends Piwik_Archive { @@ -141,8 +144,6 @@ class Piwik_Archive_Single extends Piwik_Archive * Prepares the archive. Gets the idarchive from the ArchiveProcessing. * * This will possibly launch the archiving process if the archive was not available. - * - * @return void */ public function prepareArchive() { @@ -278,8 +279,6 @@ class Piwik_Archive_Single extends Piwik_Archive * @param string $name * @param Piwik_DataTable $dataTableToLoad * @param bool $addMetadataSubtableId - * - * @return void */ public function loadSubDataTables($name, Piwik_DataTable $dataTableToLoad, $addMetadataSubtableId = false) { @@ -310,8 +309,6 @@ class Piwik_Archive_Single extends Piwik_Archive /** * Free the blob cache memory array - * - * @return void */ public function freeBlob( $name ) { @@ -322,7 +319,7 @@ class Piwik_Archive_Single extends Piwik_Archive /** * Fetches all blob fields name_* at once for the current archive for performance reasons. * - * @return void + * @return false if no visits */ public function preFetchBlob( $name ) { diff --git a/core/ArchiveProcessing.php b/core/ArchiveProcessing.php index 3c75dd310b..c46b2794d7 100644 --- a/core/ArchiveProcessing.php +++ b/core/ArchiveProcessing.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ArchiveProcessing + * @category Piwik + * @package Piwik */ /** @@ -25,7 +26,8 @@ * - name = the name of the report (ex: uniq_visitors or search_keywords_by_search_engines) * - value = the actual data * - * @package Piwik_ArchiveProcessing + * @package Piwik + * @subpackage Piwik_ArchiveProcessing */ abstract class Piwik_ArchiveProcessing { @@ -216,8 +218,6 @@ abstract class Piwik_ArchiveProcessing /** * Inits the object - * - * @return void */ protected function loadArchiveProperties() { @@ -312,8 +312,6 @@ abstract class Piwik_ArchiveProcessing /** * Init the object before launching the real archive processing - * - * @return void */ protected function initCompute() { @@ -330,8 +328,6 @@ abstract class Piwik_ArchiveProcessing * Makes sure the new archive is marked as "successful" in the DB * * We also try to delete some stuff from memory but really there is still a lot... - * - * @return void */ protected function postCompute() { diff --git a/core/ArchiveProcessing/Day.php b/core/ArchiveProcessing/Day.php index 046aa11689..767c583e73 100644 --- a/core/ArchiveProcessing/Day.php +++ b/core/ArchiveProcessing/Day.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ArchiveProcessing + * @category Piwik + * @package Piwik */ /** @@ -16,8 +17,8 @@ * * All the logic of the archiving is done inside the plugins listening to the event 'ArchiveProcessing_Day.compute' * - * @package Piwik_ArchiveProcessing - * + * @package Piwik + * @subpackage Piwik_ArchiveProcessing */ class Piwik_ArchiveProcessing_Day extends Piwik_ArchiveProcessing { @@ -32,8 +33,6 @@ class Piwik_ArchiveProcessing_Day extends Piwik_ArchiveProcessing * Main method to process logs for a day. The only logic done here is computing the number of visits, actions, etc. * All the other reports are computed inside plugins listening to the event 'ArchiveProcessing_Day.compute'. * See some of the plugins for an example eg. 'Provider' - * - * @return void */ protected function compute() { @@ -372,8 +371,8 @@ class Piwik_ArchiveProcessing_Day extends Piwik_ArchiveProcessing * LABEL2 => array( Piwik_Archive::INDEX_NB_VISITS => Y, [...] ) * ); * ) - * @param array by reference, will be modified - * @return void (array by reference is modified) + * + * @param array $interestByLabel Passed by reference, will be modified */ function enrichConversionsByLabelArray(&$interestByLabel) { @@ -394,8 +393,7 @@ class Piwik_ArchiveProcessing_Day extends Piwik_ArchiveProcessing } /** - * @param array $interestByLabelAndSubLabel - * @return void (array by reference is modified) + * @param array $interestByLabelAndSubLabel Passed by reference, will be modified */ function enrichConversionsByLabelArrayHasTwoLevels(&$interestByLabelAndSubLabel) { diff --git a/core/ArchiveProcessing/Period.php b/core/ArchiveProcessing/Period.php index 2b49575cc3..7f40c744e7 100644 --- a/core/ArchiveProcessing/Period.php +++ b/core/ArchiveProcessing/Period.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ArchiveProcessing + * @category Piwik + * @package Piwik */ /** @@ -17,7 +18,8 @@ * These methods are called by the plugins that do the logic of archiving their own data. \ * They hook on the event 'ArchiveProcessing_Period.compute' * - * @package Piwik_ArchiveProcessing + * @package Piwik + * @subpackage Piwik_ArchiveProcessing */ class Piwik_ArchiveProcessing_Period extends Piwik_ArchiveProcessing { @@ -253,8 +255,6 @@ class Piwik_ArchiveProcessing_Period extends Piwik_ArchiveProcessing * * All the other reports are computed inside plugins listening to the event 'ArchiveProcessing_Period.compute'. * See some of the plugins for an example. - * - * @return void */ protected function compute() { @@ -292,8 +292,6 @@ class Piwik_ArchiveProcessing_Period extends Piwik_ArchiveProcessing /** * Called at the end of the archiving process. * Does some cleaning job in the database. - * - * @return void */ protected function postCompute() { diff --git a/core/ArchiveProcessing/Record.php b/core/ArchiveProcessing/Record.php index 8b1c9680f0..e1b107d2e7 100644 --- a/core/ArchiveProcessing/Record.php +++ b/core/ArchiveProcessing/Record.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ArchiveProcessing + * @category Piwik + * @package Piwik */ /** @@ -20,8 +21,8 @@ * - blob ; the value will be saved in a binary field in the DB * It should be used for all the other types: PHP variables, STRING, serialized OBJECTS or ARRAYS, etc. * - * @package Piwik_ArchiveProcessing - * @subpackage Piwik_ArchiveProcessing_Record + * @package Piwik + * @subpackage Piwik_ArchiveProcessing */ abstract class Piwik_ArchiveProcessing_Record { diff --git a/core/ArchiveProcessing/Record/Blob.php b/core/ArchiveProcessing/Record/Blob.php index 3e7a88c775..bdaa307875 100644 --- a/core/ArchiveProcessing/Record/Blob.php +++ b/core/ArchiveProcessing/Record/Blob.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ArchiveProcessing + * @category Piwik + * @package Piwik */ /** @@ -14,8 +15,8 @@ * Example: $record = new Piwik_ArchiveProcessing_Record_Blob('visitor_names', serialize(array('piwik-fan', 'php', 'stevie-vibes'))); * The value will be compressed before being saved in the DB. * - * @package Piwik_ArchiveProcessing - * @subpackage Piwik_ArchiveProcessing_Record + * @package Piwik + * @subpackage Piwik_ArchiveProcessing */ class Piwik_ArchiveProcessing_Record_Blob extends Piwik_ArchiveProcessing_Record { diff --git a/core/ArchiveProcessing/Record/Numeric.php b/core/ArchiveProcessing/Record/Numeric.php index cf37c7cb89..26f0ca4781 100644 --- a/core/ArchiveProcessing/Record/Numeric.php +++ b/core/ArchiveProcessing/Record/Numeric.php @@ -6,15 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ArchiveProcessing + * @category Piwik + * @package Piwik */ /** * Numeric record. * Example: $record = new Piwik_ArchiveProcessing_Record_Numeric('nb_visitors_live', 15); * - * @package Piwik_ArchiveProcessing - * @subpackage Piwik_ArchiveProcessing_Record + * @package Piwik + * @subpackage Piwik_ArchiveProcessing */ class Piwik_ArchiveProcessing_Record_Numeric extends Piwik_ArchiveProcessing_Record { diff --git a/core/ArchiveProcessing/RecordArray.php b/core/ArchiveProcessing/RecordArray.php index c7d2990b11..1339383096 100644 --- a/core/ArchiveProcessing/RecordArray.php +++ b/core/ArchiveProcessing/RecordArray.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ArchiveProcessing + * @category Piwik + * @package Piwik */ /** @@ -27,8 +28,8 @@ * veryLongBook_2 => Z * veryLongBook_3 => M * - * @package Piwik_ArchiveProcessing - * @subpackage Piwik_ArchiveProcessing_Record + * @package Piwik + * @subpackage Piwik_ArchiveProcessing */ class Piwik_ArchiveProcessing_RecordArray extends Piwik_ArchiveProcessing_Record { diff --git a/core/Auth.php b/core/Auth.php index 036a0aef15..763d65215b 100644 --- a/core/Auth.php +++ b/core/Auth.php @@ -6,9 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ +/** + * Interface for authentication modules + * + * @package Piwik + * @subpackage Piwik_Auth + */ interface Piwik_Auth { /** * Authentication module's name, e.g., "Login" @@ -24,8 +31,11 @@ interface Piwik_Auth { } /** + * Authentication result * + * @see Zend_Auth_Result * @package Piwik + * @subpackage Piwik_Auth */ class Piwik_Auth_Result extends Zend_Auth_Result { @@ -37,7 +47,15 @@ class Piwik_Auth_Result extends Zend_Auth_Result protected $_token_auth = null; const SUCCESS_SUPERUSER_AUTH_CODE = 42; - + + /** + * Constructor for Piwik_Auth_Result + * + * @param int $code + * @param string $login identity + * @param string $token_auth + * @param array $messages + */ public function __construct($code, $login, $token_auth, array $messages = array()) { // Piwik_Auth_Result::SUCCESS_SUPERUSER_AUTH_CODE, Piwik_Auth_Result::SUCCESS, Piwik_Auth_Result::FAILURE diff --git a/core/CacheFile.php b/core/CacheFile.php index 42cde94eee..8d877abddc 100644 --- a/core/CacheFile.php +++ b/core/CacheFile.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ @@ -16,6 +17,8 @@ * * We may want to add support for cache expire, storing last modification time in the file. See code in: * - openx/lib/max/Delivery/cache.php + * + * @package Piwik */ class Piwik_CacheFile { diff --git a/core/Common.php b/core/Common.php index f30570d69b..45e03d20e2 100644 --- a/core/Common.php +++ b/core/Common.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Helper + * @category Piwik + * @package Piwik */ /** @@ -16,7 +17,7 @@ * This class should contain only the functions that are used in * both the CORE and the piwik.php statistics logging engine. * - * @package Piwik_Helper + * @package Piwik */ class Piwik_Common { @@ -113,7 +114,6 @@ class Piwik_Common * Regenerate Tracker cache files * * @param array $idSites array of idSites to clear cache for - * @return void */ static public function regenerateCacheWebsiteAttributes($idSites = array()) { @@ -131,7 +131,6 @@ class Piwik_Common * Delete existing Tracker cache * * @param string $idSite (website ID of the site to clear cache for - * @return void */ static public function deleteCacheWebsiteAttributes( $idSite ) { @@ -249,7 +248,6 @@ class Piwik_Common * @param string $path * @param int $mode (in octal) * @param bool $denyAccess - * @return void */ static public function mkdir( $path, $mode = 0755, $denyAccess = true ) { @@ -272,7 +270,6 @@ class Piwik_Common * Create .htaccess file in specified directory * * @param string $path without trailing slash - * @return void */ static public function createHtAccess( $path ) { @@ -284,7 +281,7 @@ class Piwik_Common * See http://php.net/realpath * * @param string $path - * @return string (canonicalized absolute path) + * @return string canonicalized absolute path */ static public function realpath($path) { @@ -390,7 +387,7 @@ class Piwik_Common * Sanitize a single input value * * @param string $value - * @return string (sanitized input) + * @return string sanitized input */ static public function sanitizeInputValue($value) { @@ -401,7 +398,7 @@ class Piwik_Common * Unsanitize a single input value * * @param string $value - * @return string (unsanitized input) + * @return string unsanitized input */ static public function unsanitizeInputValue($value) { @@ -573,7 +570,6 @@ class Piwik_Common } } - /** * Returns the first element of a comma separated list of IPs * @@ -591,7 +587,6 @@ class Piwik_Common return trim(self::sanitizeInputValues($ip)); } - /** * Returns the continent of a given country * @@ -683,7 +678,6 @@ class Piwik_Common /** * Returns list of valid country codes * - * @param none * @return array of 2 letter ISO codes */ static public function getCountriesList() @@ -696,6 +690,7 @@ class Piwik_Common } return $countriesList; } + /** * Returns list of valid country codes * @@ -893,7 +888,7 @@ class Piwik_Common /** * Returns true if PHP was invoked as CGI or command-line interface (shell) * - * @param none + * @since added in 0.4.4 * @return bool true if PHP invoked as a CGI or from CLI */ static public function isPhpCliMode() diff --git a/core/Config.php b/core/Config.php index 344e6873d3..84851053ea 100644 --- a/core/Config.php +++ b/core/Config.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Helper + * @category Piwik + * @package Piwik */ /** @@ -18,7 +19,7 @@ * * will read the value minimumMemoryLimit under the [General] section of the config file * - * @package Piwik_Helper + * @package Piwik */ class Piwik_Config { @@ -47,7 +48,7 @@ class Piwik_Config protected $correctCwd; /** - * Returns default relative path for configuration file + * Returns default relative path for user configuration file * * @return string */ @@ -56,6 +57,11 @@ class Piwik_Config return PIWIK_USER_PATH .'/config/config.ini.php'; } + /** + * Returns default relative path for global configuration file + * + * @return string + */ static public function getDefaultDefaultConfigPath() { return PIWIK_USER_PATH .'/config/global.ini.php'; @@ -90,8 +96,6 @@ class Piwik_Config * $config->database = array(...) * Piwik will automatically save the updated config file in __destruct() * This can be disabled (when setting partial configuration values during the installation process for example) - * - * @return void */ public function disableSavingConfigurationFileUpdates() { @@ -156,7 +160,6 @@ class Piwik_Config /** * If called, we use the database_tests credentials - * @return void */ public function setTestEnvironment() { @@ -238,7 +241,6 @@ class Piwik_Config /** * Loop through the Default and the User configuration objects and cache them in arrays. * This slightly helps reducing the Zend overhead when accessing config entries hundreds of times. - * @return void */ protected function cacheConfigArray() { @@ -276,7 +278,7 @@ class Piwik_Config } /** - * Called when getting a configuration value, eg. Zend_Registry::get('config')->superuser->login + * Called when getting a configuration value, eg. Zend_Registry::get('config')->superuser->login * * @param string $name * @return mixed value diff --git a/core/Controller.php b/core/Controller.php index 7adb00f97c..c278f22331 100644 --- a/core/Controller.php +++ b/core/Controller.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ @@ -39,7 +40,6 @@ abstract class Piwik_Controller /** * Builds the controller object, reads the date from the request, extracts plugin name from - * */ function __construct() { @@ -140,8 +140,7 @@ abstract class Piwik_Controller return $view; } - - + /** * Returns the array of new processed parameters once the parameters are applied. * For example: if you set range=last30 and date=2008-03-10, diff --git a/core/Cookie.php b/core/Cookie.php index 518a1d316f..3da0fe5cd4 100644 --- a/core/Cookie.php +++ b/core/Cookie.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Helper + * @category Piwik + * @package Piwik */ /** @@ -15,7 +16,7 @@ * - edit an existing cookie and save it * - create a new cookie, set values, expiration date, etc. and save it * - * @package Piwik_Helper + * @package Piwik */ class Piwik_Cookie { @@ -66,6 +67,7 @@ class Piwik_Cookie /** * Returns true if the visitor already has the cookie. + * * @return bool */ public function isCookieFound() @@ -75,6 +77,7 @@ class Piwik_Cookie /** * Returns the default expiry time, 2 years + * * @return int Timestamp in 2 years */ protected function getDefaultExpire() @@ -113,8 +116,6 @@ class Piwik_Cookie /** * We set the privacy policy header - * - * @return void */ protected function setP3PHeader() { @@ -123,8 +124,6 @@ class Piwik_Cookie /** * Delete the cookie - * - * @return void */ public function delete() { @@ -148,8 +147,6 @@ class Piwik_Cookie * Parses the cookie string to extract the different variables. * Unserialize the array when necessary. * Decode the non numeric values that were base64 encoded. - * - * @return void */ protected function loadContentFromCookie() { @@ -183,6 +180,7 @@ class Piwik_Cookie /** * Returns the string to save in the cookie from the $this->value array of values. * It goes through the array and generates the cookie content string. + * * @return string Cookie content */ protected function generateContentString() @@ -214,8 +212,7 @@ class Piwik_Cookie * * @param string Name of the value to save; the name will be used to retrieve this value * @param string|array|numeric Value to save - * - */ + */ public function set( $name, $value ) { $name = self::escapeValue($name); diff --git a/core/DataFiles/Countries.php b/core/DataFiles/Countries.php index ac3593dd6e..1f5dbfcc84 100644 --- a/core/DataFiles/Countries.php +++ b/core/DataFiles/Countries.php @@ -6,13 +6,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_UserCountry + * @category Piwik + * @package DataFiles */ /** * Country code and continent database. * If you want to add a new entry, please email us at hello at piwik.org - * */ if(!isset($GLOBALS['Piwik_CountryList'])) { diff --git a/core/DataFiles/LanguageToCountry.php b/core/DataFiles/LanguageToCountry.php index edd275b1bf..db71ba139f 100644 --- a/core/DataFiles/LanguageToCountry.php +++ b/core/DataFiles/LanguageToCountry.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_UserCountry + * @category Piwik + * @package DataFiles */ /** @@ -18,7 +19,6 @@ * (Notably, "en" and "zh" are excluded.) * * If you want to add a new entry, please email us at hello at piwik.org - * */ if(!isset($GLOBALS['Piwik_LanguageToCountry'])) { diff --git a/core/DataFiles/SearchEngines.php b/core/DataFiles/SearchEngines.php index 7f00a8944b..672edc2b84 100644 --- a/core/DataFiles/SearchEngines.php +++ b/core/DataFiles/SearchEngines.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Referers + * @category Piwik + * @package DataFiles */ /** diff --git a/core/DataTable.php b/core/DataTable.php index 4755ac320d..d0ced74ab6 100644 --- a/core/DataTable.php +++ b/core/DataTable.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -129,9 +130,7 @@ * * @package Piwik * @subpackage Piwik_DataTable - * */ - class Piwik_DataTable { /** @@ -279,8 +278,6 @@ class Piwik_DataTable /** * Enables the recursive sort. Means that when using $table->sort() * it will also sort all subtables using the same callback - * - * @return void */ public function enableRecursiveSort() { @@ -304,9 +301,6 @@ class Piwik_DataTable /** * Saves the current number of rows - * - * @return void - * */ function setRowsCountBeforeLimitFilter() { @@ -353,7 +347,6 @@ class Piwik_DataTable /** * Apply all filters that were previously queued to this table * @see queueFilter() - * @return void */ public function applyQueuedFilters() { @@ -443,8 +436,6 @@ class Piwik_DataTable /** * Rebuilds the index used to lookup a row by label - * - * @return void */ private function rebuildIndex() { @@ -682,6 +673,7 @@ class Piwik_DataTable /** * Rename a column in all rows + * * @param $oldName * @param $newName */ @@ -885,7 +877,6 @@ class Piwik_DataTable * //first Datatable level3 (child of second Datatable level1 for example) * 3 => 'eghuighahgaueytae78yaet7yaetaeGRQWUBGUIQGH&QE', * ); - * */ public function getSerialized( $maximumRowsInDataTable = null, $maximumRowsInSubDataTable = null, @@ -945,7 +936,6 @@ class Piwik_DataTable * The function creates all the necessary DataTable_Row * * @param string string of serialized datatable - * @return void */ public function addRowsFromSerializedArray( $stringSerialized ) { @@ -973,7 +963,6 @@ class Piwik_DataTable * array( ... ), * * ) - * @return void */ public function addRowsFromArray( $array ) { @@ -1131,8 +1120,6 @@ class Piwik_DataTable * * @param array $array See method description * @param array|null $subtablePerLabel see method description - * - * @return void */ public function addRowsFromArrayWithIndexLabel( $array, $subtablePerLabel = null) { @@ -1157,5 +1144,4 @@ class Piwik_DataTable $this->addRow( new Piwik_DataTable_Row($cleanRow) ); } } - } diff --git a/core/DataTable/Array.php b/core/DataTable/Array.php index fecd0d5d4b..48aac9d7c3 100644 --- a/core/DataTable/Array.php +++ b/core/DataTable/Array.php @@ -6,14 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * The DataTable_Array is a way to store an array of dataTable. * The Piwik_DataTable_Array implements some of the features of the Piwik_DataTable such as queueFilter, getRowsCount. * - * @package Piwik_DataTable + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Array { @@ -80,8 +82,6 @@ class Piwik_DataTable_Array * * @param string $className Filter name, eg. Piwik_DataTable_Filter_Limit * @param array $parameters Filter parameters, eg. array( 50, 10 ) - * - * @return void */ public function queueFilter( $className, $parameters = array() ) { @@ -93,8 +93,6 @@ class Piwik_DataTable_Array /** * Apply the filters previously queued to each of the DataTable of this DataTable_Array. - * - * @return void */ public function applyQueuedFilters() { diff --git a/core/DataTable/Filter.php b/core/DataTable/Filter.php index 0ee70234ca..44d2916d72 100644 --- a/core/DataTable/Filter.php +++ b/core/DataTable/Filter.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -20,8 +21,8 @@ * The concept is very simple: the filter is given the DataTable * and can do whatever is necessary on the data (in the filter() method). * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ abstract class Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/AddColumnsWhenShowAllColumns.php b/core/DataTable/Filter/AddColumnsWhenShowAllColumns.php index feed5653f1..1e1e703b66 100644 --- a/core/DataTable/Filter/AddColumnsWhenShowAllColumns.php +++ b/core/DataTable/Filter/AddColumnsWhenShowAllColumns.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_DataTable + */ class Piwik_DataTable_Filter_AddColumnsWhenShowAllColumns extends Piwik_DataTable_Filter { protected $roundPrecision = 1; diff --git a/core/DataTable/Filter/AddConstantMetadata.php b/core/DataTable/Filter/AddConstantMetadata.php index b5932a81de..25f19485f7 100644 --- a/core/DataTable/Filter/AddConstantMetadata.php +++ b/core/DataTable/Filter/AddConstantMetadata.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -14,9 +15,9 @@ * * This is used to add a column containing the logo width and height of the countries flag icons. * This value is fixed for all icons so we simply add the same value for all rows. - * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_AddConstantMetadata extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/AddSummaryRow.php b/core/DataTable/Filter/AddSummaryRow.php index b02cd21e2e..5bdbf44c02 100644 --- a/core/DataTable/Filter/AddSummaryRow.php +++ b/core/DataTable/Filter/AddSummaryRow.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -22,8 +23,8 @@ * which is the sum of all the remaining data after the top 5 data. * This row is assigned a label of 'Others'. * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_AddSummaryRow extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php b/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php index 308f7bbe49..90ea6b9ee5 100644 --- a/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php +++ b/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -21,6 +22,8 @@ * $nbVisits = Piwik_VisitsSummary_API::getVisits($idSite, $period, $date); * $dataTable->queueFilter('ColumnCallbackAddColumnPercentage', array('nb_visits', 'nb_visits_percentage', $nbVisits, 1)); * + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_ColumnCallbackAddColumnPercentage extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/ColumnCallbackAddMetadata.php b/core/DataTable/Filter/ColumnCallbackAddMetadata.php index e65940745f..bef01a9945 100644 --- a/core/DataTable/Filter/ColumnCallbackAddMetadata.php +++ b/core/DataTable/Filter/ColumnCallbackAddMetadata.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -16,10 +17,9 @@ * For example from the "label" column we can to create an "icon" 'metadata' column * with the icon URI built from the label (LINUX => UserSettings/icons/linux.png) * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ - class Piwik_DataTable_Filter_ColumnCallbackAddMetadata extends Piwik_DataTable_Filter { private $columnToRead; diff --git a/core/DataTable/Filter/ColumnCallbackDeleteRow.php b/core/DataTable/Filter/ColumnCallbackDeleteRow.php index 81136b0aa8..c9ed614bb0 100644 --- a/core/DataTable/Filter/ColumnCallbackDeleteRow.php +++ b/core/DataTable/Filter/ColumnCallbackDeleteRow.php @@ -6,14 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * Delete all rows for which a given function returns false for a given column. * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_ColumnCallbackDeleteRow extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/ColumnCallbackReplace.php b/core/DataTable/Filter/ColumnCallbackReplace.php index 20a43b97a6..6b286f228c 100644 --- a/core/DataTable/Filter/ColumnCallbackReplace.php +++ b/core/DataTable/Filter/ColumnCallbackReplace.php @@ -6,15 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * Replace a column value with a new value resulting * from the function called with the column's value * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_ColumnCallbackReplace extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/ExcludeLowPopulation.php b/core/DataTable/Filter/ExcludeLowPopulation.php index b6c57d09c6..c2f024430d 100644 --- a/core/DataTable/Filter/ExcludeLowPopulation.php +++ b/core/DataTable/Filter/ExcludeLowPopulation.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -16,8 +17,8 @@ * It is very useful to exclude noise from the reports. * You can obviously apply this filter on a percentaged column, eg. remove all countries with the column 'percent_visits' less than 0.05 * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_ExcludeLowPopulation extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/Limit.php b/core/DataTable/Filter/Limit.php index 71fa7c94dd..60a7a1b209 100644 --- a/core/DataTable/Filter/Limit.php +++ b/core/DataTable/Filter/Limit.php @@ -6,16 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * Delete all rows from the table that are not in the offset,offset+limit range * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ - class Piwik_DataTable_Filter_Limit extends Piwik_DataTable_Filter { /** diff --git a/core/DataTable/Filter/MetadataCallbackAddMetadata.php b/core/DataTable/Filter/MetadataCallbackAddMetadata.php index 9fa8bd6139..9de5c48e0c 100644 --- a/core/DataTable/Filter/MetadataCallbackAddMetadata.php +++ b/core/DataTable/Filter/MetadataCallbackAddMetadata.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -17,8 +18,8 @@ * the URL of the search engine. We use this URL to add a new "metadata" that gives * the path of the logo for this search engine URL (which has the format URL.png). * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_MetadataCallbackAddMetadata extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/MetadataCallbackReplace.php b/core/DataTable/Filter/MetadataCallbackReplace.php index cf3d071b1a..c990a32252 100644 --- a/core/DataTable/Filter/MetadataCallbackReplace.php +++ b/core/DataTable/Filter/MetadataCallbackReplace.php @@ -6,15 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * Replace a metadata value with a new value resulting * from the function called with the metadata's value * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_MetadataCallbackReplace extends Piwik_DataTable_Filter_ColumnCallbackReplace { diff --git a/core/DataTable/Filter/Null.php b/core/DataTable/Filter/Null.php index fdb04b9a6e..b5a67bdd44 100644 --- a/core/DataTable/Filter/Null.php +++ b/core/DataTable/Filter/Null.php @@ -6,15 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * Filter template. * You can use it if you want to create a new filter. * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_Null extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/Pattern.php b/core/DataTable/Filter/Pattern.php index 4bb566ea3e..46a5c71a1b 100644 --- a/core/DataTable/Filter/Pattern.php +++ b/core/DataTable/Filter/Pattern.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -14,8 +15,8 @@ * This filter is to be used on columns containing strings. * Exemple: fron the keyword report, keep only the rows for which the label contains "piwik" * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_Pattern extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/PatternRecursive.php b/core/DataTable/Filter/PatternRecursive.php index 9887181b9d..cbba3b2b48 100644 --- a/core/DataTable/Filter/PatternRecursive.php +++ b/core/DataTable/Filter/PatternRecursive.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -15,10 +16,10 @@ * - AND all the subTables associated to this row do not contain the $patternToSearch * * This filter is to be used on columns containing strings. - * Exemple: from the pages viewed report, keep only the rows that contain "piwik" or for which a subpage contains "piwik". + * Example: from the pages viewed report, keep only the rows that contain "piwik" or for which a subpage contains "piwik". * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_PatternRecursive extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/ReplaceColumnNames.php b/core/DataTable/Filter/ReplaceColumnNames.php index 6b582baca5..8671f2f81a 100644 --- a/core/DataTable/Filter/ReplaceColumnNames.php +++ b/core/DataTable/Filter/ReplaceColumnNames.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -21,8 +22,8 @@ * * You can specify the mapping array to apply in the constructor. * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_ReplaceColumnNames extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/ReplaceSummaryRowLabel.php b/core/DataTable/Filter/ReplaceSummaryRowLabel.php index 19c13e53c0..b5eb5bfd61 100644 --- a/core/DataTable/Filter/ReplaceSummaryRowLabel.php +++ b/core/DataTable/Filter/ReplaceSummaryRowLabel.php @@ -6,13 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_ReplaceSummaryRowLabel extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/SafeDecodeLabel.php b/core/DataTable/Filter/SafeDecodeLabel.php index 454d4599f4..8da7446e46 100644 --- a/core/DataTable/Filter/SafeDecodeLabel.php +++ b/core/DataTable/Filter/SafeDecodeLabel.php @@ -6,13 +6,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** - * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_SafeDecodeLabel extends Piwik_DataTable_Filter { @@ -43,4 +43,3 @@ class Piwik_DataTable_Filter_SafeDecodeLabel extends Piwik_DataTable_Filter } } } - diff --git a/core/DataTable/Filter/Sort.php b/core/DataTable/Filter/Sort.php index ae1683b6e3..eabf22415d 100644 --- a/core/DataTable/Filter/Sort.php +++ b/core/DataTable/Filter/Sort.php @@ -6,14 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * Sort the DataTable based on the value of column $columnToSort ordered by $order. * Possible to specify a natural sorting (see php.net/natsort for details) - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_Sort extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Filter/UpdateColumnsWhenShowAllGoals.php b/core/DataTable/Filter/UpdateColumnsWhenShowAllGoals.php index 0dc6b50a20..47caecf80d 100644 --- a/core/DataTable/Filter/UpdateColumnsWhenShowAllGoals.php +++ b/core/DataTable/Filter/UpdateColumnsWhenShowAllGoals.php @@ -6,12 +6,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Filter + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Filter_UpdateColumnsWhenShowAllGoals extends Piwik_DataTable_Filter { diff --git a/core/DataTable/Manager.php b/core/DataTable/Manager.php index cedf68e974..8e3506187e 100644 --- a/core/DataTable/Manager.php +++ b/core/DataTable/Manager.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -14,7 +15,8 @@ * easy way to access them. This is used to store all the DataTable during the archiving process. * At the end of archiving, the ArchiveProcessing will read the stored datatable and record them in the DB. * - * @package Piwik_DataTable + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Manager { @@ -79,8 +81,6 @@ class Piwik_DataTable_Manager /** * Delete all the registered DataTables from the manager - * - * @return void */ public function deleteAll() { @@ -109,8 +109,8 @@ class Piwik_DataTable_Manager /** * Remove the table from the manager (table has already been unset) + * * @param $id - * @return void */ public function setTableDeleted($id) { @@ -119,8 +119,6 @@ class Piwik_DataTable_Manager /** * Debug only. Dumps all tables currently registered in the Manager - * - * @return void */ public function dumpAllTables() { diff --git a/core/DataTable/Renderer.php b/core/DataTable/Renderer.php index 5d65cb90fd..c9458f16a3 100644 --- a/core/DataTable/Renderer.php +++ b/core/DataTable/Renderer.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -17,8 +18,8 @@ * $render->setTable($dataTable); * echo $render; * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Renderer + * @package Piwik + * @subpackage Piwik_DataTable */ abstract class Piwik_DataTable_Renderer { diff --git a/core/DataTable/Renderer/Console.php b/core/DataTable/Renderer/Console.php index ce0fa65482..0929de6744 100644 --- a/core/DataTable/Renderer/Console.php +++ b/core/DataTable/Renderer/Console.php @@ -6,14 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * Simple output * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Renderer + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Renderer_Console extends Piwik_DataTable_Renderer { diff --git a/core/DataTable/Renderer/Csv.php b/core/DataTable/Renderer/Csv.php index f7891ec69a..e756b518e6 100644 --- a/core/DataTable/Renderer/Csv.php +++ b/core/DataTable/Renderer/Csv.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -20,11 +21,9 @@ * * Note that CSV output doesn't handle recursive dataTable. It will output only the first parent level of the tables. * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Renderer - * + * @package Piwik + * @subpackage Piwik_DataTable */ - class Piwik_DataTable_Renderer_Csv extends Piwik_DataTable_Renderer { /** diff --git a/core/DataTable/Renderer/Html.php b/core/DataTable/Renderer/Html.php index 9d457d089e..62739fd035 100644 --- a/core/DataTable/Renderer/Html.php +++ b/core/DataTable/Renderer/Html.php @@ -6,15 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * Simple HTML output * Does not work with recursive DataTable (i.e., when a row can be associated with a subDataTable). * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Renderer + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Renderer_Html extends Piwik_DataTable_Renderer { diff --git a/core/DataTable/Renderer/Json.php b/core/DataTable/Renderer/Json.php index 25b8248b98..5febed6a88 100644 --- a/core/DataTable/Renderer/Json.php +++ b/core/DataTable/Renderer/Json.php @@ -6,15 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** * JSON export. Using the php 5.2 feature json_encode. * Works with recursive DataTable (when a row can be associated with a subDataTable). * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Renderer + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Renderer_Json extends Piwik_DataTable_Renderer { diff --git a/core/DataTable/Renderer/Php.php b/core/DataTable/Renderer/Php.php index 2621411911..b7d5f216da 100644 --- a/core/DataTable/Renderer/Php.php +++ b/core/DataTable/Renderer/Php.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -17,8 +18,8 @@ * * Works with recursive DataTable (when a row can be associated with a subDataTable). * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Renderer + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Renderer_Php extends Piwik_DataTable_Renderer { diff --git a/core/DataTable/Renderer/Rss.php b/core/DataTable/Renderer/Rss.php index 5359619ffb..4dbfa58b7c 100644 --- a/core/DataTable/Renderer/Rss.php +++ b/core/DataTable/Renderer/Rss.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -14,8 +15,8 @@ * The RSS renderer can be used only on Piwik_DataTable_Array that are arrays of Piwik_DataTable. * A RSS feed contains one dataTable per element in the Piwik_DataTable_Array. * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Renderer + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Renderer_Rss extends Piwik_DataTable_Renderer { diff --git a/core/DataTable/Renderer/Xml.php b/core/DataTable/Renderer/Xml.php index 267aae8381..9eb2c30bbf 100644 --- a/core/DataTable/Renderer/Xml.php +++ b/core/DataTable/Renderer/Xml.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -16,8 +17,8 @@ * * Works with recursive DataTable (when a row can be associated with a subDataTable). * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Renderer + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Renderer_Xml extends Piwik_DataTable_Renderer { diff --git a/core/DataTable/Row.php b/core/DataTable/Row.php index 30a27de39c..cb8a20959b 100644 --- a/core/DataTable/Row.php +++ b/core/DataTable/Row.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -25,9 +26,8 @@ * PERFORMANCE: Do *not* add new fields except if necessary in this object. New fields will be * serialized and recorded in the DB millions of times. This object size is critical and must be under control. * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Row - * + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Row { diff --git a/core/DataTable/Row/DataTableSummary.php b/core/DataTable/Row/DataTableSummary.php index b6d6e54785..b0c612573d 100644 --- a/core/DataTable/Row/DataTableSummary.php +++ b/core/DataTable/Row/DataTableSummary.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -17,8 +18,8 @@ * * @see Piwik_DataTable_Row::sumRow() for more information on the algorithm * - * @package Piwik_DataTable - * @subpackage Piwik_DataTable_Row + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Row_DataTableSummary extends Piwik_DataTable_Row { diff --git a/core/DataTable/Simple.php b/core/DataTable/Simple.php index 2decd3dd5a..d8cd993fc6 100644 --- a/core/DataTable/Simple.php +++ b/core/DataTable/Simple.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_DataTable + * @category Piwik + * @package Piwik */ /** @@ -19,18 +20,19 @@ * - the renderer can be applied (XML, PHP, HTML, etc.) * So you don't have to write specific renderer for your data, it is already available in all the formats supported natively by Piwik. * - * @package Piwik_DataTable + * @package Piwik + * @subpackage Piwik_DataTable */ class Piwik_DataTable_Simple extends Piwik_DataTable { /** * Loads (append) in the DataTable the array information + * * @param array Array containing the rows information * array( * 'Label row 1' => Value row 1, * 'Label row 2' => Value row 2, * ) - * @return void */ function addRowsFromArray($array) { diff --git a/core/Date.php b/core/Date.php index 4fd1d5cc4c..f6aefce606 100644 --- a/core/Date.php +++ b/core/Date.php @@ -6,13 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Helper + * @category Piwik + * @package Piwik */ /** * Date object widely used in Piwik. * - * @package Piwik_Helper + * @package Piwik */ class Piwik_Date { @@ -171,9 +172,9 @@ class Piwik_Date /** * Subtracts days from the existing date object and returns a new Piwik_Date object + * Returned is the new date object * Doesn't modify $this * - * Returned is the new date object * @return Piwik_Date new date */ public function subDay( $n ) @@ -229,6 +230,7 @@ class Piwik_Date /** * Returns a localized date string, given a template. * Allowed tags are: %day%, %shortDay%, %longDay%, etc. + * * @param $template string eg. %shortMonth% %longYear% * @return string eg. "Aug 2009" */ @@ -332,6 +334,7 @@ class Piwik_Date /** * Returns a date object set to yesterday midnight + * * @return Piwik_Date */ static public function yesterday() diff --git a/core/ErrorHandler.php b/core/ErrorHandler.php index 3a4adcaa48..e1162972e9 100644 --- a/core/ErrorHandler.php +++ b/core/ErrorHandler.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Helper + * @category Piwik + * @package Piwik */ if(!defined('E_STRICT')) { define('E_STRICT', 2048); } @@ -17,7 +18,10 @@ if(!defined('E_USER_DEPRECATED')) { define('E_USER_DEPRECATED', 16384); } /** * Error handler used to display nicely errors in Piwik * - * @package Piwik_Helper + * @param int $errno Error number + * @param string $errstring Error message + * @param string $errfile File name + * @param int $errline Line number */ function Piwik_ErrorHandler($errno, $errstr, $errfile, $errline) { diff --git a/core/ExceptionHandler.php b/core/ExceptionHandler.php index 6fdbde719b..f5554ad89c 100644 --- a/core/ExceptionHandler.php +++ b/core/ExceptionHandler.php @@ -6,13 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Helper + * @category Piwik + * @package Piwik */ /** * Exception handler used to display nicely exceptions in Piwik * - * @package Piwik_Helper + * @param Exception $exception */ function Piwik_ExceptionHandler(Exception $exception) { diff --git a/core/Form.php b/core/Form.php index be1f5734fc..3a8e194214 100644 --- a/core/Form.php +++ b/core/Form.php @@ -6,15 +6,17 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Helper + * @category Piwik + * @package Piwik */ /** * Parent class for forms to be included in Smarty * * For an example, @see Piwik_Login_Form - * - * @package Piwik_Helper + * + * @package Piwik + * @subpackage Piwik_Form */ abstract class Piwik_Form extends HTML_QuickForm { @@ -28,8 +30,8 @@ abstract class Piwik_Form extends HTML_QuickForm } parent::HTML_QuickForm('form', 'POST', $action); - $this->registerRule( 'checkEmail', 'function', 'Piwik_Form_isValidEmailString'); - $this->registerRule( 'fieldHaveSameValue', 'function', 'Piwik_Form_fieldHaveSameValue'); + $this->registerRule( 'checkEmail', 'rule', 'Piwik_Form_isValidEmailString'); + $this->registerRule( 'fieldHaveSameValue', 'rule', 'Piwik_Form_fieldHaveSameValue'); $this->init(); } @@ -95,14 +97,34 @@ abstract class Piwik_Form extends HTML_QuickForm } } -function Piwik_Form_fieldHaveSameValue($element, $value, $arg) +/** + * Custom validation rule: Compare fields for equality + * For more general applications, @see HTML_QuickForm_Rule_Compare + * + * @package Piwik + * @subpackage Piwik_Form + */ +class Piwik_Form_fieldHaveSameValue extends HTML_QuickForm_Rule { - $value2 = Piwik_Common::getRequestVar( $arg, '', 'string'); - $value2 = Piwik_Common::unsanitizeInputValue($value2); - return $value === $value2; + function validate($value, $arg) + { + $value2 = Piwik_Common::getRequestVar( $arg, '', 'string'); + $value2 = Piwik_Common::unsanitizeInputValue($value2); + return $value === $value2; + } } -function Piwik_Form_isValidEmailString( $element, $value ) +/** + * Custom validation rule: Does this look like an email address? + * For stronger checking, @see HTML_QuickForm_Rule_Email + * + * @package Piwik + * @subpackage Piwik_Form + */ +class Piwik_Form_isValidEmailString extends HTML_QuickForm_Rule { - return Piwik::isValidEmailString($value); + function validate($value) + { + return Piwik::isValidEmailString($value); + } } diff --git a/core/FrontController.php b/core/FrontController.php index 33d95f9cce..c0880dd9d2 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -25,6 +25,7 @@ require_once PIWIK_INCLUDE_PATH . '/core/Option.php'; * For a detailed explanation, see the documentation on http://dev.piwik.org/trac/wiki/MainSequenceDiagram * * @package Piwik + * @subpackage Piwik_FrontController */ class Piwik_FrontController { @@ -173,8 +174,6 @@ class Piwik_FrontController * - loads the plugin, * - inits the DB connection, * - etc. - * - * @return void */ function init() { @@ -248,8 +247,6 @@ class Piwik_FrontController * Assign CLI parameters as if they were REQUEST or GET parameters. * You can trigger Piwik from the command line by * # /usr/bin/php5 /path/to/piwik/index.php -- "module=API&method=Actions.getActions&idSite=1&period=day&date=previous8&format=php" - * - * @return void */ static protected function assignCliParametersToRequest() { @@ -269,6 +266,7 @@ class Piwik_FrontController * Exception thrown when the requested plugin is not activated in the config file * * @package Piwik + * @subpackage Piwik_FrontController */ class Piwik_FrontController_PluginDeactivatedException extends Exception { @@ -278,8 +276,9 @@ class Piwik_FrontController_PluginDeactivatedException extends Exception } } - -// for more information see http://dev.piwik.org/trac/ticket/374 +/** + * For more information: @link http://dev.piwik.org/trac/ticket/374 + */ function destroy(&$var) { if (is_object($var)) $var->__destruct(); diff --git a/core/Loader.php b/core/Loader.php index 8df94541d3..e88c1db1af 100644 --- a/core/Loader.php +++ b/core/Loader.php @@ -6,15 +6,27 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ +/** + * Piwik auto loader + * + * @package Piwik + */ class Piwik_Loader { // our class search path; current directory is intentionally excluded protected static $dirs = array( '/core/', '/libs/', '/plugins/' ); - protected static function getClassPath($class) + /** + * Get class file name + * + * @param string $class Class name + * @return string Class file name + */ + protected static function getClassFileName($class) { $class = str_replace('_', '/', $class); @@ -31,9 +43,15 @@ class Piwik_Loader return $class; } + /** + * Load class by name + * + * @param string $class Class name + * @throws exception if class cannot be loaded + */ public static function autoload($class) { - $classPath = self::getClassPath($class); + $classPath = self::getClassFileName($class); while(!empty($classPath)) { // auto-discover class location diff --git a/core/Log.php b/core/Log.php index 9d4ebb17ed..3c9a3624be 100644 --- a/core/Log.php +++ b/core/Log.php @@ -6,12 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Log + * @category Piwik + * @package Piwik */ /** * - * @package Piwik_Log + * @package Piwik + * @subpackage Piwik_Log */ abstract class Piwik_Log extends Zend_Log { @@ -114,7 +116,9 @@ abstract class Piwik_Log extends Zend_Log } /** - * @package Piwik_Log + * + * @package Piwik + * @subpackage Piwik_Log */ class Piwik_Log_Formatter_FileFormatter implements Zend_Log_Formatter_Interface { @@ -136,6 +140,11 @@ class Piwik_Log_Formatter_FileFormatter implements Zend_Log_Formatter_Interface } } +/** + * + * @package Piwik + * @subpackage Piwik_Log + */ class Piwik_Log_Formatter_ScreenFormatter implements Zend_Log_Formatter_Interface { function formatEvent($event) diff --git a/core/Log/APICall.php b/core/Log/APICall.php index ba1e73fa4f..ae390798b4 100644 --- a/core/Log/APICall.php +++ b/core/Log/APICall.php @@ -6,15 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Log - * @subpackage Piwik_Log_APICall + * @category Piwik + * @package Piwik */ /** * Class used to log all the API Calls information (class / method / parameters / returned value / time spent) * - * @package Piwik_Log - * @subpackage Piwik_Log_APICall + * @package Piwik + * @subpackage Piwik_Log */ class Piwik_Log_APICall extends Piwik_Log { @@ -54,8 +54,8 @@ class Piwik_Log_APICall extends Piwik_Log /** * Class used to format the API Call log on the screen. * - * @package Piwik_Log - * @subpackage Piwik_Log_APICall + * @package Piwik + * @subpackage Piwik_Log */ class Piwik_Log_APICall_Formatter_ScreenFormatter extends Piwik_Log_Formatter_ScreenFormatter { diff --git a/core/Log/Error.php b/core/Log/Error.php index c58c68989a..7c41fa91e6 100644 --- a/core/Log/Error.php +++ b/core/Log/Error.php @@ -6,15 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Log - * @subpackage Piwik_Log_Error + * @category Piwik + * @package Piwik */ /** * Class used to log an error event. * - * @package Piwik_Log - * @subpackage Piwik_Log_Error + * @package Piwik + * @subpackage Piwik_Log */ class Piwik_Log_Error extends Piwik_Log { @@ -55,13 +55,11 @@ class Piwik_Log_Error extends Piwik_Log } } - - /** * Format an error event to be displayed on the screen. * - * @package Piwik_Log - * @subpackage Piwik_Log_Error + * @package Piwik + * @subpackage Piwik_Log */ class Piwik_Log_Error_Formatter_ScreenFormatter extends Piwik_Log_Formatter_ScreenFormatter { diff --git a/core/Log/Exception.php b/core/Log/Exception.php index 585d43c103..6ae10b64cd 100644 --- a/core/Log/Exception.php +++ b/core/Log/Exception.php @@ -6,16 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Log - * @subpackage Piwik_Log_Exception + * @category Piwik + * @package Piwik */ /** * Class used to log an exception event. * Displays the exception with a user friendly error message, suggests to get support from piwik.org * - * @package Piwik_Log - * @subpackage Piwik_Log_Exception + * @package Piwik + * @subpackage Piwik_Log */ class Piwik_Log_Exception extends Piwik_Log { @@ -59,8 +59,8 @@ class Piwik_Log_Exception extends Piwik_Log /** * Format an exception event to be displayed on the screen. * - * @package Piwik_Log - * @subpackage Piwik_Log_Exception + * @package Piwik + * @subpackage Piwik_Log */ class Piwik_Log_Exception_Formatter_ScreenFormatter extends Piwik_Log_Formatter_ScreenFormatter { diff --git a/core/Log/Message.php b/core/Log/Message.php index f5a945ce37..239fd1bc53 100644 --- a/core/Log/Message.php +++ b/core/Log/Message.php @@ -6,15 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Log - * @subpackage Piwik_Log_Message + * @category Piwik + * @package Piwik */ /** * Class used to log a standard message event. * - * @package Piwik_Log - * @subpackage Piwik_Log_Message + * @package Piwik + * @subpackage Piwik_Log */ class Piwik_Log_Message extends Piwik_Log { @@ -42,13 +42,12 @@ class Piwik_Log_Message extends Piwik_Log } } - /** * Format a standard message event to be displayed on the screen. * The message can be a PHP array or a string. * - * @package Piwik_Log - * @subpackage Piwik_Log_Message + * @package Piwik + * @subpackage Piwik_Log */ class Piwik_Log_Message_Formatter_ScreenFormatter extends Piwik_Log_Formatter_ScreenFormatter { diff --git a/core/Mail.php b/core/Mail.php index d25cd23262..e9740edd16 100644 --- a/core/Mail.php +++ b/core/Mail.php @@ -1,17 +1,18 @@ <?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$ * + * @category Piwik * @package Piwik */ /** * Class for sending mails, for more information see: - * http://framework.zend.com/manual/en/zend.mail.html + * @link http://framework.zend.com/manual/en/zend.mail.html * * @package Piwik */ diff --git a/core/Option.php b/core/Option.php index a00658eaa9..da1905dc82 100644 --- a/core/Option.php +++ b/core/Option.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ @@ -17,6 +18,7 @@ * * This should not be used to store user preferences nor website preferences. * + * @package Piwik */ class Piwik_Option { @@ -40,6 +42,7 @@ class Piwik_Option /** * Returns the option value for the requested option $name + * * @param string $name * @return string|false if not found */ diff --git a/core/Period.php b/core/Period.php index 5af51c6ea8..7fd59b84e8 100644 --- a/core/Period.php +++ b/core/Period.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Helper + * @category Piwik + * @package Piwik */ /** @@ -20,8 +21,8 @@ * that checks whether the subperiods have already been computed. * This is for performance improvements, computing the subperiods is done a per demand basis. * - * - * @package Piwik_Helper + * @package Piwik + * @subpackage Piwik_Period */ abstract class Piwik_Period { diff --git a/core/Period/Day.php b/core/Period/Day.php index b6e6a3d644..32686a0f51 100644 --- a/core/Period/Day.php +++ b/core/Period/Day.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Period + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_Period + */ class Piwik_Period_Day extends Piwik_Period { protected $label = 'day'; diff --git a/core/Period/Month.php b/core/Period/Month.php index d27052be16..40fda847ca 100644 --- a/core/Period/Month.php +++ b/core/Period/Month.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Period + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_Period + */ class Piwik_Period_Month extends Piwik_Period { protected $label = 'month'; diff --git a/core/Period/Range.php b/core/Period/Range.php index 25b247f810..ba30cb9f36 100644 --- a/core/Period/Range.php +++ b/core/Period/Range.php @@ -6,12 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Period + * @category Piwik + * @package Piwik */ /** * from a starting date to an ending date * + * @package Piwik + * @subpackage Piwik_Period */ class Piwik_Period_Range extends Piwik_Period { diff --git a/core/Period/Week.php b/core/Period/Week.php index be2f2858c8..9f99782c21 100644 --- a/core/Period/Week.php +++ b/core/Period/Week.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Period + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_Period + */ class Piwik_Period_Week extends Piwik_Period { protected $label = 'week'; diff --git a/core/Period/Year.php b/core/Period/Year.php index df8c5e9808..7e04b8c898 100644 --- a/core/Period/Year.php +++ b/core/Period/Year.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Period + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_Period + */ class Piwik_Period_Year extends Piwik_Period { protected $label = 'year'; diff --git a/core/Piwik.php b/core/Piwik.php index 023660e3df..049cc1b450 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -1,11 +1,12 @@ <?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$ - * + * + * @category Piwik * @package Piwik */ @@ -34,8 +35,6 @@ class Piwik /** * Checks that the directories Piwik needs write access are actually writable * Displays a nice error page if permissions are missing on some directories - * - * @return void */ static public function checkDirectoriesWritableOrDie( $directoriesToCheck = null ) { @@ -405,9 +404,9 @@ class Piwik /** * Returns true if PHP was invoked as CGI or command-line interface (shell) - * Maintained for backwards compatibility. (Deprecated) * - * @param none + * @deprecated deprecated in 0.4.4 + * @see Piwik_Common::isPhpCliMode() * @return bool true if PHP invoked as a CGI or from CLI */ static public function isPhpCliMode() @@ -1268,7 +1267,6 @@ class Piwik * @param string $source eg. './tmp/latest' * @param string $target eg. '.' * @param bool $excludePhp - * @return void */ static public function copyRecursive($source, $target, $excludePhp=false ) { @@ -1556,8 +1554,6 @@ class Piwik /** * Creates an entry in the User table for the "anonymous" user. - * - * @return void */ static public function createAnonymousUser() { diff --git a/core/Plugin.php b/core/Plugin.php index d638499420..d0d118180a 100644 --- a/core/Plugin.php +++ b/core/Plugin.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ @@ -42,7 +43,6 @@ abstract class Piwik_Plugin /** * Executed after loading plugin and registering translations * Useful for code that uses translated strings from the plugin. - * @return void */ public function postLoad() { @@ -54,8 +54,7 @@ abstract class Piwik_Plugin * - create tables * - update existing tables * - etc. - * @return void - */ + */ public function install() { return; @@ -63,7 +62,6 @@ abstract class Piwik_Plugin /** * Remove the created resources during the install - * @return void */ public function uninstall() { @@ -72,7 +70,8 @@ abstract class Piwik_Plugin /** * Returns the plugin name - * @var string + * + * @return string */ public function getName() { @@ -82,7 +81,8 @@ abstract class Piwik_Plugin /** * Returns the plugin version number - * @var string + * + * @return string */ public function getVersion() { @@ -99,5 +99,4 @@ abstract class Piwik_Plugin { return substr(get_class($this), strlen("Piwik_")); } - } diff --git a/core/PluginsFunctions/AdminMenu.php b/core/PluginsFunctions/AdminMenu.php index f8445aca1a..e926c77d7f 100644 --- a/core/PluginsFunctions/AdminMenu.php +++ b/core/PluginsFunctions/AdminMenu.php @@ -6,9 +6,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik + * @category Piwik + * @package PluginsFunctions */ +/** + * @package PluginsFunctions + */ class Piwik_AdminMenu { private $adminMenu = null; @@ -50,7 +54,7 @@ class Piwik_AdminMenu } /* - * @return void + * */ public function add($adminMenuName, $url) { @@ -61,7 +65,7 @@ class Piwik_AdminMenu } /* - * @return void + * */ public function rename($adminMenuOriginal, $adminMenuRenamed) { diff --git a/core/PluginsFunctions/Menu.php b/core/PluginsFunctions/Menu.php index f3e9fa5f88..d2b33675c6 100644 --- a/core/PluginsFunctions/Menu.php +++ b/core/PluginsFunctions/Menu.php @@ -6,9 +6,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik + * @category Piwik + * @package PluginsFunctions */ +/** + * @package PluginsFunctions + */ class Piwik_Menu { protected $menu = null; @@ -30,7 +34,7 @@ class Piwik_Menu } /* - * @return void + * */ protected function __construct() { @@ -42,7 +46,7 @@ class Piwik_Menu } /* - * @return void + * */ function add( $mainMenuName, $subMenuName, $url ) { @@ -57,7 +61,7 @@ class Piwik_Menu } /* - * @return void + * */ function rename($mainMenuOriginal, $subMenuOriginal, $mainMenuRenamed, $subMenuRenamed) { @@ -66,7 +70,7 @@ class Piwik_Menu } /* - * @return void + * */ function editUrl($mainMenuToEdit, $subMenuToEdit, $newUrl ) { @@ -87,7 +91,7 @@ class Piwik_Menu } /* - * @return void + * */ private function applyEdits() { @@ -108,7 +112,7 @@ class Piwik_Menu } /* - * @return void + * */ private function applyRenames() { @@ -128,7 +132,7 @@ class Piwik_Menu } /* - * @return void + * */ private function applyOrdering() { diff --git a/core/PluginsFunctions/Sql.php b/core/PluginsFunctions/Sql.php index b689cbaa6d..1b248c4780 100644 --- a/core/PluginsFunctions/Sql.php +++ b/core/PluginsFunctions/Sql.php @@ -6,10 +6,18 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik + * @category Piwik + * @package PluginsFunctions */ /** + * @package PluginsFunctions + */ +class Piwik_Sql +{ +} + +/** * Executes a SQL query on the DB and returns the Zend_Db_Statement object * If you want to fetch data from the DB you should use the function Piwik_FetchAll() * diff --git a/core/PluginsFunctions/WidgetsList.php b/core/PluginsFunctions/WidgetsList.php index 276c45eb83..ce1b7a417f 100644 --- a/core/PluginsFunctions/WidgetsList.php +++ b/core/PluginsFunctions/WidgetsList.php @@ -6,9 +6,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik + * @category Piwik + * @package PluginsFunctions */ +/** + * @package PluginsFunctions + */ class Piwik_WidgetsList { static protected $widgets = null; diff --git a/core/PluginsManager.php b/core/PluginsManager.php index 666ecca049..98a4a87a72 100644 --- a/core/PluginsManager.php +++ b/core/PluginsManager.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ @@ -297,7 +298,6 @@ class Piwik_PluginsManager /** * @param Piwik_Plugin $plugin - * @return void */ public function unloadPlugin( $plugin ) { diff --git a/core/Site.php b/core/Site.php index 7e9b539722..d692c470ae 100644 --- a/core/Site.php +++ b/core/Site.php @@ -6,12 +6,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Site + * @category Piwik + * @package Piwik */ /** * - * @package Piwik_Site + * @package Piwik */ class Piwik_Site { diff --git a/core/Smarty.php b/core/Smarty.php index 1d2298471a..714968f2a7 100644 --- a/core/Smarty.php +++ b/core/Smarty.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ @@ -14,6 +15,12 @@ defined('PIWIK_INCLUDE_PATH') or die; require_once PIWIK_INCLUDE_PATH . '/libs/Smarty/Smarty.class.php'; +/** + * Smarty class + * + * @package Piwik + * @subpackage Piwik_Smarty + */ class Piwik_Smarty extends Smarty { function trigger_error($error_msg, $error_type = E_USER_WARNING) @@ -22,4 +29,8 @@ class Piwik_Smarty extends Smarty } } +/** + * @package Piwik + * @subpackage Piwik_Smarty + */ class SmartyException extends Exception {} diff --git a/core/SmartyPlugins/function.assignTopBar.php b/core/SmartyPlugins/function.assignTopBar.php index 7f5fced668..1f1c451bbd 100644 --- a/core/SmartyPlugins/function.assignTopBar.php +++ b/core/SmartyPlugins/function.assignTopBar.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/function.hiddenurl.php b/core/SmartyPlugins/function.hiddenurl.php index 2bdcccb5a4..9d6c38d7bb 100644 --- a/core/SmartyPlugins/function.hiddenurl.php +++ b/core/SmartyPlugins/function.hiddenurl.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/function.loadJavascriptTranslations.php b/core/SmartyPlugins/function.loadJavascriptTranslations.php index c58e18ff66..f3b559df88 100644 --- a/core/SmartyPlugins/function.loadJavascriptTranslations.php +++ b/core/SmartyPlugins/function.loadJavascriptTranslations.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/function.logoHtml.php b/core/SmartyPlugins/function.logoHtml.php index 85a57b02e3..6cc4d416fd 100644 --- a/core/SmartyPlugins/function.logoHtml.php +++ b/core/SmartyPlugins/function.logoHtml.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/function.postEvent.php b/core/SmartyPlugins/function.postEvent.php index ece8a3bd1e..e761c6d223 100644 --- a/core/SmartyPlugins/function.postEvent.php +++ b/core/SmartyPlugins/function.postEvent.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/function.sparkline.php b/core/SmartyPlugins/function.sparkline.php index f1e74a08f2..0e04b19972 100644 --- a/core/SmartyPlugins/function.sparkline.php +++ b/core/SmartyPlugins/function.sparkline.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/function.url.php b/core/SmartyPlugins/function.url.php index efa9b5bccf..8008a8e7e4 100644 --- a/core/SmartyPlugins/function.url.php +++ b/core/SmartyPlugins/function.url.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/modifier.escape.php b/core/SmartyPlugins/modifier.escape.php index f4e72b1030..4591e1df2e 100644 --- a/core/SmartyPlugins/modifier.escape.php +++ b/core/SmartyPlugins/modifier.escape.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/modifier.sumtime.php b/core/SmartyPlugins/modifier.sumtime.php index 0f5627a0c6..836d335827 100644 --- a/core/SmartyPlugins/modifier.sumtime.php +++ b/core/SmartyPlugins/modifier.sumtime.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/modifier.translate.php b/core/SmartyPlugins/modifier.translate.php index a98ca05108..3c3a7346cc 100644 --- a/core/SmartyPlugins/modifier.translate.php +++ b/core/SmartyPlugins/modifier.translate.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/modifier.unescape.php b/core/SmartyPlugins/modifier.unescape.php index 7672f6e25c..66e2395ad8 100644 --- a/core/SmartyPlugins/modifier.unescape.php +++ b/core/SmartyPlugins/modifier.unescape.php @@ -4,8 +4,9 @@ * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later - * @version $Id: $ + * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/modifier.urlRewriteBasicView.php b/core/SmartyPlugins/modifier.urlRewriteBasicView.php index 61fae37542..920f953999 100644 --- a/core/SmartyPlugins/modifier.urlRewriteBasicView.php +++ b/core/SmartyPlugins/modifier.urlRewriteBasicView.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/modifier.urlRewriteWithParameters.php b/core/SmartyPlugins/modifier.urlRewriteWithParameters.php index aac1e98bb1..e2077b493c 100644 --- a/core/SmartyPlugins/modifier.urlRewriteWithParameters.php +++ b/core/SmartyPlugins/modifier.urlRewriteWithParameters.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/SmartyPlugins/outputfilter.cachebuster.php b/core/SmartyPlugins/outputfilter.cachebuster.php index afa1b99666..10ddee896f 100644 --- a/core/SmartyPlugins/outputfilter.cachebuster.php +++ b/core/SmartyPlugins/outputfilter.cachebuster.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package SmartyPlugins */ diff --git a/core/TablePartitioning.php b/core/TablePartitioning.php index 2c78d8c18f..1edcbb4ef4 100644 --- a/core/TablePartitioning.php +++ b/core/TablePartitioning.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ @@ -15,6 +16,7 @@ * Piwik::getTablesInstalled() to add the new table to the list of tablename_* to fetch * * @package Piwik + * @subpackage Piwik_TablePartitioning */ abstract class Piwik_TablePartitioning { @@ -95,6 +97,7 @@ abstract class Piwik_TablePartitioning /** * * @package Piwik + * @subpackage Piwik_TablePartitioning */ class Piwik_TablePartitioning_Monthly extends Piwik_TablePartitioning { @@ -113,9 +116,11 @@ class Piwik_TablePartitioning_Monthly extends Piwik_TablePartitioning } } + /** * * @package Piwik + * @subpackage Piwik_TablePartitioning */ class Piwik_TablePartitioning_Daily extends Piwik_TablePartitioning { @@ -131,6 +136,5 @@ class Piwik_TablePartitioning_Daily extends Piwik_TablePartitioning $date = date("Y_m_d", $this->timestamp); return $prefixTables . $this->tableName . "_" . $date; - } - + } } diff --git a/core/Timer.php b/core/Timer.php index f7a3442452..06b54aa4a2 100644 --- a/core/Timer.php +++ b/core/Timer.php @@ -6,12 +6,13 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Helper + * @category Piwik + * @package Piwik */ /** * - * @package Piwik_Helper + * @package Piwik */ class Piwik_Timer { diff --git a/core/Tracker.php b/core/Tracker.php index 96e6ab0843..0e9d149a3b 100644 --- a/core/Tracker.php +++ b/core/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 */ /** @@ -16,7 +17,8 @@ * * We try to include as little files as possible (no dependency on 3rd party modules). * - * @package Piwik_Tracker + * @package Piwik + * @subpackage Piwik_Tracker */ class Piwik_Tracker { 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 { } diff --git a/core/Translate.php b/core/Translate.php index 37ab0265b4..5301b0914c 100644 --- a/core/Translate.php +++ b/core/Translate.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ @@ -132,39 +133,58 @@ class Piwik_Translate { setlocale(LC_ALL, $GLOBALS['Piwik_translations']['General_Locale']); } -} -function Piwik_Translate($string, $args = array()) -{ - if(!is_array($args)) - { - $args = array($args); - } - if(isset($GLOBALS['Piwik_translations'][$string])) + /** + * Returns translated string or given message if translation is not found. + * + * @param string Translation string index + * @param array $args sprintf arguments + * @return string + */ + static public function translate($string, args = array()) { - $string = $GLOBALS['Piwik_translations'][$string]; + if(!is_array($args)) + { + $args = array($args); + } + if(isset($GLOBALS['Piwik_translations'][$string])) + { + $string = $GLOBALS['Piwik_translations'][$string]; + } + if(count($args) == 0) + { + return $string; + } + return vsprintf($string, $args); } - if(count($args) == 0) + + /** + * Returns translated string or given message if translation is not found. + * This function does not throw any exception. Use it to translate exceptions. + * + * @param string $message Translation string index + * @param array $args sprintf arguments + * @return string + */ + static public function translateException($message, $args = array()) { - return $string; + try + { + return Piwik_Translate($message, $args); + } + catch(Exception $e) + { + return $message; + } } - return vsprintf($string, $args); } +function Piwik_Translate($string, $args = array()) +{ + return Piwik_Translate::translate($string, $args); +} -/** - * Returns translated string or given message if translation is not found. - * This function does not throw any exception. Use it to translate exceptions. - * - * @param string Translation string index - * @return string - */ function Piwik_TranslateException($message, $args = array()) { - try { - return Piwik_Translate($message, $args); - } - catch(Exception $e) { - return $message; - } + return Piwik_Translate::translateException($message, $args); } diff --git a/core/UpdateCheck.php b/core/UpdateCheck.php index de38b0eef5..c5ebe07874 100644 --- a/core/UpdateCheck.php +++ b/core/UpdateCheck.php @@ -6,9 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ +/** + * Class to check if a newer version of Piwik is available + * + * @package Piwik + */ class Piwik_UpdateCheck { const CHECK_INTERVAL = 86400; @@ -16,7 +22,10 @@ class Piwik_UpdateCheck const LATEST_VERSION = 'UpdateCheck_LatestVersion'; const PIWIK_HOST = 'http://api.piwik.org/1.0/getLatestVersion/'; const SOCKET_TIMEOUT = 2; - + + /** + * Check for a newer version + */ public static function check() { $lastTimeChecked = Piwik_GetOption(self::LAST_TIME_CHECKED); @@ -43,6 +52,8 @@ class Piwik_UpdateCheck } /** + * Returns version number of a newer Piwik release. + * * @return string|false false if current version is the latest available, * or the latest version number if a newest release is available */ diff --git a/core/Updater.php b/core/Updater.php index 4184700719..18804a5929 100644 --- a/core/Updater.php +++ b/core/Updater.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ @@ -14,6 +15,13 @@ defined('PIWIK_INCLUDE_PATH') or die; require_once PIWIK_INCLUDE_PATH . '/core/Option.php'; +/** + * Load and execute all relevant, incremental update scripts for Piwik core and plugins, and bump the component version numbers for completed updates. + * + * @package Piwik + * @subpackage Piwik_Updater + * @see Piwik_iUpdate + */ class Piwik_Updater { const INDEX_CURRENT_VERSION = 0; @@ -31,9 +39,10 @@ class Piwik_Updater } /** + * Add component to check + * * @param string $name * @param string $version - * @return void */ public function addComponentToCheck($name, $version) { @@ -41,9 +50,10 @@ class Piwik_Updater } /** + * Record version of successfully completed component update + * * @param string $name * @param string $version - * @return void */ public function recordComponentSuccessfullyUpdated($name, $version) { @@ -67,6 +77,8 @@ class Piwik_Updater } /** + * Update the named component + * * @param string $name * @return array of warning strings if applicable */ @@ -104,8 +116,10 @@ class Piwik_Updater $this->recordComponentSuccessfullyUpdated($name, $this->componentsWithNewVersion[$name][self::INDEX_NEW_VERSION]); return $warningMessages; } - + /** + * Construct list of update files for the outdated components + * * @return array( componentName => array( file1 => version1, [...]), [...]) */ private function loadComponentsWithUpdateFile() @@ -154,6 +168,8 @@ class Piwik_Updater } /** + * Construct list of outdated components + * * @return array array( componentName => array( oldVersion, newVersion), [...]) */ private function loadComponentsWithNewVersion() @@ -215,6 +231,9 @@ class Piwik_Updater /** * Performs database update(s) + * + * @param string $file Update script filename + * @param array $sqlarray An array of SQL queries to be executed */ static function updateDatabase($file, $sqlarray) { @@ -233,4 +252,10 @@ class Piwik_Updater } } +/** + * Exception thrown by updater if a non-recoverable error occurs + * + * @package Piwik + * @subpackage Piwik_Updater + */ class Piwik_Updater_UpdateErrorException extends Exception {} diff --git a/core/Url.php b/core/Url.php index a34bd66178..7ba48bbc99 100644 --- a/core/Url.php +++ b/core/Url.php @@ -6,18 +6,22 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Helper + * @category Piwik + * @package Piwik */ /** - * @package Piwik_Helper + * Class to retrieve absolute URL or URI components of the current URL, + * and handle URL redirection. * + * @package Piwik */ class Piwik_Url { /** * If current URL is "http://example.org/dir1/dir2/index.php?param1=value1¶m2=value2" * will return "http://example.org/dir1/dir2/index.php?param1=value1¶m2=value2" + * * @return string */ static public function getCurrentUrl() @@ -30,6 +34,7 @@ class Piwik_Url /** * If current URL is "http://example.org/dir1/dir2/index.php?param1=value1¶m2=value2" * will return "http://example.org/dir1/dir2/index.php" + * * @return string */ static public function getCurrentUrlWithoutQueryString() @@ -41,6 +46,7 @@ class Piwik_Url /** * If current URL is "http://example.org/dir1/dir2/index.php?param1=value1¶m2=value2" * will return "http://example.org/dir1/dir2/" + * * @return string with trailing slash */ static public function getCurrentUrlWithoutFileName() @@ -53,6 +59,7 @@ class Piwik_Url /** * If current URL is "http://example.org/dir1/dir2/index.php?param1=value1¶m2=value2" * will return "/dir1/dir2/" + * * @return string with trailing slash */ static public function getCurrentScriptPath() @@ -73,6 +80,7 @@ class Piwik_Url /** * If current URL is "http://example.org/dir1/dir2/index.php?param1=value1¶m2=value2" * will return "/dir1/dir2/index.php" + * * @return string */ static public function getCurrentScriptName() @@ -104,6 +112,7 @@ class Piwik_Url /** * If current URL is "http://example.org/dir1/dir2/index.php?param1=value1¶m2=value2" * will return "http://example.org" + * * @return string */ static public function getCurrentHost() @@ -135,6 +144,7 @@ class Piwik_Url /** * If current URL is "http://example.org/dir1/dir2/index.php?param1=value1¶m2=value2" * will return "?param1=value1¶m2=value2" + * * @return string */ static public function getCurrentQueryString() @@ -190,6 +200,7 @@ class Piwik_Url /** * Given an array of parameters name->value, returns the query string. * Also works with array values using the php array syntax for GET parameters. + * * @param $parameters eg. array( 'param1' => 10, 'param2' => array(1,2)) * @return string eg. "param1=10¶m2[]=1¶m2[]=2" */ @@ -221,8 +232,6 @@ class Piwik_Url /** * Redirects the user to the Referer if found. * If the user doesn't have a referer set, it redirects to the current URL without query string. - * - * @return void http Location: header sent */ static public function redirectToReferer() { @@ -238,7 +247,6 @@ class Piwik_Url * Redirects the user to the specified URL * * @param string $url - * @return void http Location: header sent */ static public function redirectToUrl( $url ) { @@ -259,5 +267,4 @@ class Piwik_Url } return false; } - } diff --git a/core/Version.php b/core/Version.php index 52eca8eda7..b285f8ce7a 100644 --- a/core/Version.php +++ b/core/Version.php @@ -1,14 +1,21 @@ <?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$ - * + * + * @category Piwik * @package Piwik */ -final class Piwik_Version { +/** + * Piwik version information. + * + * @package Piwik + */ +final class Piwik_Version +{ const VERSION = '0.4.3'; } diff --git a/core/View.php b/core/View.php index 1c33310737..47b3849e3f 100644 --- a/core/View.php +++ b/core/View.php @@ -6,13 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ /** - * - * @package Piwik_View + * View class to render the user interface * + * @package Piwik */ class Piwik_View implements Piwik_iView { @@ -69,9 +70,9 @@ class Piwik_View implements Piwik_iView /** * Directly assigns a variable to the view script. * VAR names may not be prefixed with '_'. + * * @param string $key The variable name. * @param mixed $val The variable value. - * @return void */ public function __set($key, $val) { @@ -81,6 +82,7 @@ class Piwik_View implements Piwik_iView /** * Retrieves an assigned variable. * VAR names may not be prefixed with '_'. + * * @param string $key The variable name. * @return mixed The variable value. */ @@ -192,8 +194,8 @@ class Piwik_View implements Piwik_iView /** * View factory method * - * @param $templateName (e.g., 'index') - * @param $viewType (e.g., Piwik_View::CLI) + * @param $templateName Template name (e.g., 'index') + * @param $viewType View type (e.g., Piwik_View::CLI) */ static public function factory( $templateName, $viewType = null) { diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php index 592bc13f56..a15e0ee4f1 100644 --- a/core/ViewDataTable.php +++ b/core/ViewDataTable.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** @@ -31,26 +32,29 @@ * </pre> * * @see factory() for all the available output (cloud tags, html table, pie chart, vertical bar chart) - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ abstract class Piwik_ViewDataTable { /** * Template file that will be loaded for this view. * Usually set in the Piwik_ViewDataTable_* + * * @var string eg. 'CoreHome/templates/cloud.tpl' */ protected $dataTableTemplate = null; /** * Flag used to make sure the main() is only executed once + * * @var bool */ protected $mainAlreadyExecuted = false; /** * Contains the values set for the parameters + * * @see getJavascriptVariablesToSet() * @var array */ @@ -59,18 +63,21 @@ abstract class Piwik_ViewDataTable /** * Array of properties that are available in the view (from smarty) * Used to store UI properties, eg. "show_footer", "show_search", etc. + * * @var array */ protected $viewProperties = array(); /** * If the current dataTable refers to a subDataTable (eg. keywordsBySearchEngineId for id=X) this variable is set to the Id + * * @var bool|int */ protected $idSubtable = false; /** * DataTable loaded from the API for this ViewDataTable. + * * @var Piwik_DataTable */ protected $dataTable = null; @@ -120,12 +127,14 @@ abstract class Piwik_ViewDataTable /** * Method to be implemented by the ViewDataTable_*. * This method should create and initialize a $this->view object @see Piwik_iView + * * @return mixed either prints the result or returns the output string */ abstract public function main(); /** * Unique string ID that defines the format of the dataTable, eg. "pieChart", "table", etc. + * * @return string */ abstract protected function getViewDataTableId(); @@ -223,7 +232,6 @@ abstract class Piwik_ViewDataTable * @param string $currentControllerAction eg. 'getKeywords' * @param string $apiMethodToRequestDataTable eg. 'Referers.getKeywords' * @param string $controllerActionCalledWhenRequestSubTable eg. 'getSearchEnginesFromKeywordId' - * @return void */ public function init( $currentControllerName, $currentControllerAction, @@ -320,7 +328,6 @@ abstract class Piwik_ViewDataTable * The function init() must have been called before, so that the object knows which API module and action to call. * It builds the API request string and uses Piwik_API_Request to call the API. * The requested Piwik_DataTable object is stored in $this->dataTable. - * @return void */ protected function loadDataTableFromAPI() { @@ -430,6 +437,7 @@ abstract class Piwik_ViewDataTable /** * Returns array of properties, eg. "show_footer", "show_search", etc. + * * @return array of boolean */ protected function getViewProperties() @@ -588,7 +596,6 @@ abstract class Piwik_ViewDataTable /** * The generic filters (limit, offset, sort by visit desc) will not be applied to this datatable. - * @return void */ public function disableGenericFilters() { @@ -598,8 +605,6 @@ abstract class Piwik_ViewDataTable /** * The queued filters (replace column names, enhance column with percentage signs, add logo metadata information, etc.) * will not be applied to this datatable. They can be manually applied by calling applyQueuedFilters on the datatable. - * - * @return void */ public function disableQueuedFilters() { @@ -608,7 +613,6 @@ abstract class Piwik_ViewDataTable /** * The "X-Y of Z" won't be displayed under this table - * @return void */ public function disableOffsetInformation() { @@ -617,7 +621,6 @@ abstract class Piwik_ViewDataTable /** * The search box won't be displayed under this table - * @return void */ public function disableSearchBox() { @@ -626,7 +629,6 @@ abstract class Piwik_ViewDataTable /** * Do not show the footer icons (show all columns icon, "plus" icon) - * @return void */ public function disableFooterIcons() { @@ -635,7 +637,6 @@ abstract class Piwik_ViewDataTable /** * When this method is called, the output will not contain the template datatable_footer.tpl - * @return void */ public function disableFooter() { @@ -644,7 +645,6 @@ abstract class Piwik_ViewDataTable /** * The "Include low population" link won't be displayed under this table - * @return void */ public function disableExcludeLowPopulation() { @@ -653,7 +653,6 @@ abstract class Piwik_ViewDataTable /** * Whether or not to show the "View table" icon - * @return void */ public function disableShowTable() { @@ -662,7 +661,6 @@ abstract class Piwik_ViewDataTable /** * Whether or not to show the "View more data" icon - * @return void */ public function disableShowAllColumns() { @@ -671,7 +669,6 @@ abstract class Piwik_ViewDataTable /** * Whether or not to show the tag cloud, pie charts, bar chart icons - * @return void */ public function disableShowAllViewsIcons() { @@ -680,7 +677,6 @@ abstract class Piwik_ViewDataTable /** * Whether or not to show the "goal" icon - * @return void */ public function enableShowGoals() { @@ -695,7 +691,6 @@ abstract class Piwik_ViewDataTable * * @param int|float If a row value is less than this value, it will be removed from the dataTable * @param string The name of the column for which we compare the value to $minValue - * @return void */ public function setExcludeLowPopulation( $columnName = null, $minValue = null ) { @@ -712,7 +707,6 @@ abstract class Piwik_ViewDataTable * * @param string $pattern to look for * @param string $column to compare the pattern to - * @return void */ public function setSearchPattern($pattern, $column) { @@ -724,7 +718,6 @@ abstract class Piwik_ViewDataTable * Sets the maximum number of rows of the table * * @param int $limit - * @return void */ public function setLimit( $limit ) { @@ -739,7 +732,6 @@ abstract class Piwik_ViewDataTable * * @param int|string $columnId eg. 'nb_visits' for some tables, or Piwik_Archive::INDEX_NB_VISITS for others * @param string $order desc or asc - * @return void */ public function setSortedColumn( $columnId, $order = 'desc') { @@ -829,7 +821,6 @@ abstract class Piwik_ViewDataTable * * @param string parameter name * @param mixed $value - * @return void */ public function setCustomParameter($parameter, $value) { diff --git a/core/ViewDataTable/Cloud.php b/core/ViewDataTable/Cloud.php index b2242705b5..9f9a7215a1 100644 --- a/core/ViewDataTable/Cloud.php +++ b/core/ViewDataTable/Cloud.php @@ -6,15 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** * Reads the requested DataTable from the API, and prepares the data to give * to Piwik_Visualization_Cloud that will display the tag cloud (via the template cloud.tpl). * - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ class Piwik_ViewDataTable_Cloud extends Piwik_ViewDataTable { diff --git a/core/ViewDataTable/GenerateGraphData.php b/core/ViewDataTable/GenerateGraphData.php index b49526cb79..3d80273a0c 100644 --- a/core/ViewDataTable/GenerateGraphData.php +++ b/core/ViewDataTable/GenerateGraphData.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** @@ -26,8 +27,8 @@ * } * </pre> * - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable { @@ -72,8 +73,6 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable * for example when plotting visits that have a given plugin enabled: * one visit can have several plugins, hence the sum is much greater than the number of visits. * In this case displaying the percentage doesn't make sense. - * - * @return void */ public function disallowPercentageInGraphTooltip() { diff --git a/core/ViewDataTable/GenerateGraphData/ChartEvolution.php b/core/ViewDataTable/GenerateGraphData/ChartEvolution.php index d7ffc5f811..0250a1583f 100644 --- a/core/ViewDataTable/GenerateGraphData/ChartEvolution.php +++ b/core/ViewDataTable/GenerateGraphData/ChartEvolution.php @@ -6,14 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** * Piwik_ViewDataTable_GenerateGraphData for the Evolution graph (eg. Last 30 days visits) using Piwik_Visualization_Chart_Evolution * - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ class Piwik_ViewDataTable_GenerateGraphData_ChartEvolution extends Piwik_ViewDataTable_GenerateGraphData { diff --git a/core/ViewDataTable/GenerateGraphData/ChartPie.php b/core/ViewDataTable/GenerateGraphData/ChartPie.php index f671c43dfb..1f32e0bd02 100644 --- a/core/ViewDataTable/GenerateGraphData/ChartPie.php +++ b/core/ViewDataTable/GenerateGraphData/ChartPie.php @@ -6,14 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** * Piwik_ViewDataTable_GenerateGraphData for the pie chart, using Piwik_Visualization_Chart_Pie * - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ class Piwik_ViewDataTable_GenerateGraphData_ChartPie extends Piwik_ViewDataTable_GenerateGraphData { diff --git a/core/ViewDataTable/GenerateGraphData/ChartVerticalBar.php b/core/ViewDataTable/GenerateGraphData/ChartVerticalBar.php index 772a6a216b..d1a3282131 100644 --- a/core/ViewDataTable/GenerateGraphData/ChartVerticalBar.php +++ b/core/ViewDataTable/GenerateGraphData/ChartVerticalBar.php @@ -6,14 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** * Piwik_ViewDataTable_GenerateGraphData for the vertical bar graph, using Piwik_Visualization_Chart_VerticalBar * - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ class Piwik_ViewDataTable_GenerateGraphData_ChartVerticalBar extends Piwik_ViewDataTable_GenerateGraphData { diff --git a/core/ViewDataTable/GenerateGraphHTML.php b/core/ViewDataTable/GenerateGraphHTML.php index ebf771bceb..ee6ef1f48d 100644 --- a/core/ViewDataTable/GenerateGraphHTML.php +++ b/core/ViewDataTable/GenerateGraphHTML.php @@ -6,15 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** * This class generates the HTML code to embed to flash graphs in the page. * It doesn't call the API but simply prints the html snippet. * - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ abstract class Piwik_ViewDataTable_GenerateGraphHTML extends Piwik_ViewDataTable { diff --git a/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php b/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php index 3b728d65a2..fae0235bfb 100644 --- a/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php +++ b/core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php @@ -6,14 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** * Generates HTML embed for the Evolution graph * - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ class Piwik_ViewDataTable_GenerateGraphHTML_ChartEvolution extends Piwik_ViewDataTable_GenerateGraphHTML { diff --git a/core/ViewDataTable/GenerateGraphHTML/ChartPie.php b/core/ViewDataTable/GenerateGraphHTML/ChartPie.php index bb29e17d1c..bd80b52a0c 100644 --- a/core/ViewDataTable/GenerateGraphHTML/ChartPie.php +++ b/core/ViewDataTable/GenerateGraphHTML/ChartPie.php @@ -6,14 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** * Generates HTML embed for the Pie chart * - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ class Piwik_ViewDataTable_GenerateGraphHTML_ChartPie extends Piwik_ViewDataTable_GenerateGraphHTML { diff --git a/core/ViewDataTable/GenerateGraphHTML/ChartVerticalBar.php b/core/ViewDataTable/GenerateGraphHTML/ChartVerticalBar.php index b746f44cb7..8e5d7e8896 100644 --- a/core/ViewDataTable/GenerateGraphHTML/ChartVerticalBar.php +++ b/core/ViewDataTable/GenerateGraphHTML/ChartVerticalBar.php @@ -6,15 +6,16 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** * * Generates HTML embed for the vertical bar chart * - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ class Piwik_ViewDataTable_GenerateGraphHTML_ChartVerticalBar extends Piwik_ViewDataTable_GenerateGraphHTML { diff --git a/core/ViewDataTable/HtmlTable.php b/core/ViewDataTable/HtmlTable.php index 2e2155685d..962461e8f3 100644 --- a/core/ViewDataTable/HtmlTable.php +++ b/core/ViewDataTable/HtmlTable.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** @@ -14,8 +15,8 @@ * * Reads the requested DataTable from the API. * - * @package Piwik_ViewDataTable - * + * @package Piwik + * @subpackage Piwik_ViewDataTable */ class Piwik_ViewDataTable_HtmlTable extends Piwik_ViewDataTable { @@ -153,8 +154,6 @@ class Piwik_ViewDataTable_HtmlTable extends Piwik_ViewDataTable /** * Sets the columns in the HTML table as not sortable (they are not clickable) - * - * @return void */ public function disableSort() { diff --git a/core/ViewDataTable/HtmlTable/AllColumns.php b/core/ViewDataTable/HtmlTable/AllColumns.php index 01a8b11a5b..dc9e554532 100644 --- a/core/ViewDataTable/HtmlTable/AllColumns.php +++ b/core/ViewDataTable/HtmlTable/AllColumns.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_ViewDataTable + */ class Piwik_ViewDataTable_HtmlTable_AllColumns extends Piwik_ViewDataTable_HtmlTable { protected function getViewDataTableId() diff --git a/core/ViewDataTable/HtmlTable/Goals.php b/core/ViewDataTable/HtmlTable/Goals.php index d5b129eaab..a4627e0cd5 100644 --- a/core/ViewDataTable/HtmlTable/Goals.php +++ b/core/ViewDataTable/HtmlTable/Goals.php @@ -6,9 +6,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ +/** + * @package Piwik + * @subpackage Piwik_ViewDataTable + */ class Piwik_ViewDataTable_HtmlTable_Goals extends Piwik_ViewDataTable_HtmlTable { protected function getViewDataTableId() diff --git a/core/ViewDataTable/Sparkline.php b/core/ViewDataTable/Sparkline.php index 65e6564898..c24ad59a75 100644 --- a/core/ViewDataTable/Sparkline.php +++ b/core/ViewDataTable/Sparkline.php @@ -6,13 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_ViewDataTable + * @category Piwik + * @package Piwik */ /** * Reads the requested DataTable from the API and prepare data for the Sparkline view. * - * @package Piwik_ViewDataTable + * @package Piwik + * @subpackage Piwik_ViewDataTable */ class Piwik_ViewDataTable_Sparkline extends Piwik_ViewDataTable { diff --git a/core/Visualization/Chart.php b/core/Visualization/Chart.php index beb201c5b2..00a846b9a5 100644 --- a/core/Visualization/Chart.php +++ b/core/Visualization/Chart.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Visualization + * @category Piwik + * @package Piwik */ // no direct access @@ -17,7 +18,8 @@ require_once PIWIK_INCLUDE_PATH . '/libs/open-flash-chart/php-ofc-library/open-f /** * Generates the data in the Open Flash Chart format, from the given data. * - * @package Piwik_Visualization + * @package Piwik + * @subpackage Piwik_Visualization */ abstract class Piwik_Visualization_Chart implements Piwik_iView { diff --git a/core/Visualization/Chart/Evolution.php b/core/Visualization/Chart/Evolution.php index 738e0048ca..266a080683 100644 --- a/core/Visualization/Chart/Evolution.php +++ b/core/Visualization/Chart/Evolution.php @@ -6,13 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Visualization + * @category Piwik + * @package Piwik */ /** * Customize the Evolution chart style for the flash graph * - * @package Piwik_Visualization + * @package Piwik + * @subpackage Piwik_Visualization */ class Piwik_Visualization_Chart_Evolution extends Piwik_Visualization_Chart { diff --git a/core/Visualization/Chart/Pie.php b/core/Visualization/Chart/Pie.php index fdeb0cdf46..9064efc436 100644 --- a/core/Visualization/Chart/Pie.php +++ b/core/Visualization/Chart/Pie.php @@ -6,13 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Visualization + * @category Piwik + * @package Piwik */ /** * Customize & set values for the Flash Pie chart * - * @package Piwik_Visualization + * @package Piwik + * @subpackage Piwik_Visualization */ class Piwik_Visualization_Chart_Pie extends Piwik_Visualization_Chart { diff --git a/core/Visualization/Chart/VerticalBar.php b/core/Visualization/Chart/VerticalBar.php index 12e55bd54b..1e81ca46c3 100644 --- a/core/Visualization/Chart/VerticalBar.php +++ b/core/Visualization/Chart/VerticalBar.php @@ -6,13 +6,15 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Visualization + * @category Piwik + * @package Piwik */ /** * Customize & set values for the flash Vertical bar chart * - * @package Piwik_Visualization + * @package Piwik + * @subpackage Piwik_Visualization */ class Piwik_Visualization_Chart_VerticalBar extends Piwik_Visualization_Chart { diff --git a/core/Visualization/Cloud.php b/core/Visualization/Cloud.php index 75a680a966..614daf0d8b 100644 --- a/core/Visualization/Cloud.php +++ b/core/Visualization/Cloud.php @@ -6,17 +6,18 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Visualization + * @category Piwik + * @package Piwik */ - /** * Generates a tag cloud from a given data array. * The generated tag cloud can be in PHP format, or in HTML. * * Inspired from Derek Harvey (www.derekharvey.co.uk) * - * @package Piwik_Visualization + * @package Piwik + * @subpackage Piwik_Visualization */ class Piwik_Visualization_Cloud { diff --git a/core/Visualization/Sparkline.php b/core/Visualization/Sparkline.php index d9c2dcfd3c..c892bfe1e7 100644 --- a/core/Visualization/Sparkline.php +++ b/core/Visualization/Sparkline.php @@ -6,7 +6,8 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * - * @package Piwik_Visualization + * @category Piwik + * @package Piwik */ // no direct access @@ -18,7 +19,8 @@ require_once PIWIK_INCLUDE_PATH . '/libs/sparkline/lib/Sparkline_Line.php'; * Renders a sparkline image given a PHP data array. * Using the Sparkline PHP Graphing Library sparkline.org * - * @package Piwik_Visualization + * @package Piwik + * @subpackage Piwik_Visualization */ class Piwik_Visualization_Sparkline implements Piwik_iView { diff --git a/core/iUpdate.php b/core/iUpdate.php index 55b31383c7..a1ad37a10d 100644 --- a/core/iUpdate.php +++ b/core/iUpdate.php @@ -1,15 +1,19 @@ <?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: $ - * + * @version $Id$ + * + * @category Piwik * @package Piwik */ /** + * Interface to be implemented by update scripts + * + * @example /core/Updates/0.4.2.php Incremental update script from version 0.4.1 to 0.4.2 * @package Piwik */ interface Piwik_iUpdate diff --git a/core/iView.php b/core/iView.php index bbb5195d18..d25926a21e 100644 --- a/core/iView.php +++ b/core/iView.php @@ -6,11 +6,12 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ /** - * @package Piwik_Visualization + * @package Piwik */ interface Piwik_iView { diff --git a/core/testMinimumPhpVersion.php b/core/testMinimumPhpVersion.php index 441736b696..6c22185a13 100644 --- a/core/testMinimumPhpVersion.php +++ b/core/testMinimumPhpVersion.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ * + * @category Piwik * @package Piwik */ @@ -16,8 +17,6 @@ defined('PIWIK_INCLUDE_PATH') or die; * This file is executed before anything else. * It checks the minimum PHP version required to run Piwik. * This file must be compatible PHP4. - * - * @package Piwik */ $piwik_minimumPHPVersion = '5.1.3'; |