diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Archive.php | 67 | ||||
-rw-r--r-- | core/Common.php | 2 | ||||
-rw-r--r-- | core/DataAccess/LogAggregator.php | 184 | ||||
-rw-r--r-- | core/DataTable.php | 34 | ||||
-rw-r--r-- | core/DataTable/Filter/AddColumnsProcessedMetrics.php | 2 | ||||
-rw-r--r-- | core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php | 2 | ||||
-rw-r--r-- | core/DataTable/Map.php | 2 | ||||
-rw-r--r-- | core/Date.php | 8 | ||||
-rw-r--r-- | core/Db.php | 2 | ||||
-rw-r--r-- | core/FrontController.php | 2 | ||||
-rw-r--r-- | core/Http.php | 2 | ||||
-rw-r--r-- | core/IP.php | 4 | ||||
-rw-r--r-- | core/Notification.php | 2 | ||||
-rw-r--r-- | core/Period.php | 2 | ||||
-rw-r--r-- | core/Plugin.php | 8 | ||||
-rw-r--r-- | core/Plugin/Archiver.php | 2 | ||||
-rw-r--r-- | core/Plugin/Controller.php | 4 | ||||
-rw-r--r-- | core/Plugin/ControllerAdmin.php | 2 | ||||
-rw-r--r-- | core/Plugin/Settings.php | 12 | ||||
-rw-r--r-- | core/RankingQuery.php | 13 | ||||
-rw-r--r-- | core/ScheduledTask.php | 4 | ||||
-rw-r--r-- | core/ScheduledTime.php | 2 | ||||
-rw-r--r-- | core/Settings/Setting.php | 4 | ||||
-rw-r--r-- | core/Site.php | 2 | ||||
-rw-r--r-- | core/View.php | 2 | ||||
-rw-r--r-- | core/ViewDataTable/Config.php | 14 |
26 files changed, 192 insertions, 192 deletions
diff --git a/core/Archive.php b/core/Archive.php index f1627a8eb1..d7f59e0ff8 100644 --- a/core/Archive.php +++ b/core/Archive.php @@ -25,16 +25,15 @@ use Piwik\Period\Range; * * If archive data is not found, this class will initiate the archiving process. [1](#footnote-1) * - * **Archive** instances must be created using the [build](#build) factory method; + * **Archive** instances must be created using the {@link build()} factory method; * they cannot be constructed. * - * You can search for metrics (such as `nb_visits`) using the [getNumeric](#getNumeric) and - * [getDataTableFromNumeric](#getDataTableFromNumeric) methods. You can search for - * reports using the [getBlob](#getBlob), [getDataTable](#getDataTable) and - * [getDataTableExpanded](#getDataTableExpanded) methods. + * You can search for metrics (such as `nb_visits`) using the {@link getNumeric()} and + * {@link getDataTableFromNumeric()} methods. You can search for + * reports using the {@link getBlob()}, {@link getDataTable()} and {@link getDataTableExpanded()} methods. * * If you're creating an API that returns report data, you may want to use the - * [getDataTableFromArchive](#getDataTableFromArchive) helper function. + * {@link getDataTableFromArchive()} helper function. * * ### Learn more * @@ -183,20 +182,20 @@ class Archive /** * Returns a new Archive instance that will query archive data for the given set of * sites and periods, using an optional Segment. - * + * * This method uses data that is found in query parameters, so the parameters to this * function can all be strings. - * + * * If you want to create an Archive instance with an array of Period instances, use - * [Archive::factory](#factory). - * + * {@link Archive::factory()}. + * * @param string|int|array $idSites A single ID (eg, `'1'`), multiple IDs (eg, `'1,2,3'` or `array(1, 2, 3)`), * or `'all'`. * @param string $period 'day', `'week'`, `'month'`, `'year'` or `'range'` - * @param Date|string $strDate 'YYYY-MM-DD', magic keywords (ie, 'today'; @see Date::factory()) + * @param Date|string $strDate 'YYYY-MM-DD', magic keywords (ie, 'today'; {@link Date::factory()} * or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD'). - * @param false|string $segment Segment definition or false if no segment should be used. @see Piwik\Segment - * @param false|string $_restrictSitesToLogin Used only when running as a scheduled task. + * @param bool|false|string $segment Segment definition or false if no segment should be used. {@link Piwik\Segment} + * @param bool|false|string $_restrictSitesToLogin Used only when running as a scheduled task. * @return Archive */ public static function build($idSites, $period, $strDate, $segment = false, $_restrictSitesToLogin = false) @@ -222,10 +221,10 @@ class Archive * sites and periods, using an optional segment. * * This method uses an array of Period instances and a Segment instance, instead of strings - * like [Archive::build](#build). + * like {@link build()}. * * If you want to create an Archive instance using data found in query parameters, - * use [Archive::build](#build). + * use {@link build()}. * * @param Segment $segment The segment to use. For no segment, use `new Segment('', $idSites)`. * @param array $periods An array of Period instances. @@ -257,10 +256,10 @@ class Archive /** * Queries and returns metric data in an array. * - * If multiple sites were requested in [build](#build) or [factory](#factory) the result will + * If multiple sites were requested in {@link build()} or {@link factory()} the result will * be indexed by site ID. * - * If multiple periods were requested in [build](#build) or [factory](#factory) the result will + * If multiple periods were requested in {@link build()} or {@link factory()} the result will * be indexed by period. * * The site ID index is always first, so if multiple sites & periods were requested, the result @@ -297,10 +296,10 @@ class Archive * data can technically be anything. In other words, you can store whatever you want * as archive data blobs. * - * If multiple sites were requested in [build](#build) or [factory](#factory) the result will + * If multiple sites were requested in {@link build()} or {@link factory()} the result will * be indexed by site ID. * - * If multiple periods were requested in [build](#build) or [factory](#factory) the result will + * If multiple periods were requested in {@link build()} or {@link factory()} the result will * be indexed by period. * * The site ID index is always first, so if multiple sites & periods were requested, the result @@ -321,10 +320,10 @@ class Archive /** * Queries and returns metric data in a DataTable instance. * - * If multiple sites were requested in [build](#build) or [factory](#factory) the result will + * If multiple sites were requested in {@link build()} or {@link factory()} the result will * be a DataTable\Map that is indexed by site ID. * - * If multiple periods were requested in [build](#build) or [factory](#factory) the result will + * If multiple periods were requested in {@link build()} or {@link factory()} the result will * be a DataTable\Map that is indexed by period. * * The site ID index is always first, so if multiple sites & periods were requested, the result @@ -351,10 +350,10 @@ class Archive * This method will query blob data that is a serialized array of of DataTable\Row's and * unserialize it. * - * If multiple sites were requested in [build](#build) or [factory](#factory) the result will + * If multiple sites were requested in {@link build()} or {@link factory()} the result will * be a DataTable\Map that is indexed by site ID. * - * If multiple periods were requested in [build](#build) or [factory](#factory) the result will + * If multiple periods were requested in {@link build()} or {@link factory()} the result will * be a DataTable\Map that is indexed by period. * * The site ID index is always first, so if multiple sites & periods were requested, the result @@ -375,10 +374,10 @@ class Archive /** * Queries and returns one report with all of its subtables loaded. * - * If multiple sites were requested in [build](#build) or [factory](#factory) the result will + * If multiple sites were requested in {@link build()} or {@link factory()} the result will * be a DataTable\Map that is indexed by site ID. * - * If multiple periods were requested in [build](#build) or [factory](#factory) the result will + * If multiple periods were requested in {@link build()} or {@link factory()} the result will * be a DataTable\Map that is indexed by period. * * The site ID index is always first, so if multiple sites & periods were requested, the result @@ -431,15 +430,15 @@ class Archive * query parameter data. API methods can use this method to reduce code redundancy. * * @param string $name The name of the report to return. - * @param int|string|array $idSite @see [build](#build) - * @param string $period @see [build](#build) - * @param string $date @see [build](#build) - * @param string $segment @see [build](#build) - * @param bool $expanded If true, loads all subtables. @see [getDataTableExpanded](#getDataTableExpanded) - * @param int|null $idSubtable @see [getDataTableExpanded](#getDataTableExpanded) - * @param int|null $depth @see [getDataTableExpanded](#getDataTableExpanded) - * @return DataTable|DataTable\Map @see [getDataTable](#getDataTable) and - * [getDataTableExpanded](#getDataTableExpanded) for more + * @param int|string|array $idSite @see {@link build()} + * @param string $period @see {@link build()} + * @param string $date @see {@link build()} + * @param string $segment @see {@link build()} + * @param bool $expanded If true, loads all subtables. See {@link getDataTableExpanded()} + * @param int|null $idSubtable See {@link getDataTableExpanded()} + * @param int|null $depth See {@link getDataTableExpanded()} + * @return DataTable|DataTable\Map See {@link getDataTable()} and + * {@link getDataTableExpanded()} for more * information */ public static function getDataTableFromArchive($name, $idSite, $period, $date, $segment, $expanded, diff --git a/core/Common.php b/core/Common.php index 8cee108fd2..a655599434 100644 --- a/core/Common.php +++ b/core/Common.php @@ -198,7 +198,7 @@ class Common /** * Sanitizes a string to help avoid XSS vulnerabilities. * - * This function is automatically called when [getRequestVar](#getRequestVar) is called, + * This function is automatically called when {@link getRequestVar()} is called, * so you should not normally have to use it. * * You should used it when outputting data that isn't escaped and was diff --git a/core/DataAccess/LogAggregator.php b/core/DataAccess/LogAggregator.php index d4fe8981dc..9699544eda 100644 --- a/core/DataAccess/LogAggregator.php +++ b/core/DataAccess/LogAggregator.php @@ -65,20 +65,20 @@ use Piwik\Tracker\GoalManager; * $uniqueVisitors = $row[Metrics::INDEX_NB_UNIQ_VISITORS]; * $visits = $row[Metrics::INDEX_NB_VISITS]; * $actions = $row[Metrics::INDEX_NB_ACTIONS]; - * + * * // ... do something w/ calculated metrics ... * } - * + * * **Aggregating conversion data** - * + * * $archiveProcessor = // ... * $logAggregator = $archiveProcessor->getLogAggregator(); - * + * * // get metrics for ecommerce conversions for each country * $query = $logAggregator->queryConversionsByDimension( * $dimensions = array('log_conversion.location_country'), * $where = 'log_conversion.idgoal = 0', // 0 is the special ecommerceOrder idGoal value in the table - * + * * // also calculate average tax and max shipping per country * $additionalSelects = array( * 'AVG(log_conversion.revenue_tax) as avg_tax', @@ -88,14 +88,14 @@ use Piwik\Tracker\GoalManager; * if ($query === false) { * return; * } - * + * * while ($row = $query->fetch()) { * $country = $row['location_country']; * $numEcommerceSales = $row[Metrics::INDEX_GOAL_NB_CONVERSIONS]; * $numVisitsWithEcommerceSales = $row[Metrics::INDEX_GOAL_NB_VISITS_CONVERTED]; * $avgTaxForCountry = $country['avg_tax']; * $maxShippingForCountry = $country['max_shipping']; - * + * * // ... do something with aggregated data ... * } */ @@ -241,27 +241,27 @@ class LogAggregator * * <a name="queryVisitsByDimension-result-set"/> * **Result Set** - * + * * The following columns are in each row of the result set: - * - * - **[Metrics::INDEX_NB_UNIQ_VISITORS](#)**: The total number of unique visitors in this group - * of aggregated visits. - * - **[Metrics::INDEX_NB_VISITS](#)**: The total number of visits aggregated. - * - **[Metrics::INDEX_NB_ACTIONS](#)**: The total number of actions performed in this group of - * aggregated visits. - * - **[Metrics::INDEX_MAX_ACTIONS](#)**: The maximum actions perfomred in one visit for this group of - * visits. - * - **[Metrics::INDEX_SUM_VISIT_LENGTH](#)**: The total amount of time spent on the site for this - * group of visits. - * - **[Metrics::INDEX_BOUNCE_COUNT](#)**: The total number of bounced visits in this group of - * visits. - * - **[Metrics::INDEX_NB_VISITS_CONVERTED](#)**: The total number of visits for which at least one - * conversion occurred, for this group of visits. - * + * + * - **{@link Piwik\Metrics::INDEX_NB_UNIQ_VISITORS}**: The total number of unique visitors in this group + * of aggregated visits. + * - **{@link Piwik\Metrics::INDEX_NB_VISITS}**: The total number of visits aggregated. + * - **{@link Piwik\Metrics::INDEX_NB_ACTIONS}**: The total number of actions performed in this group of + * aggregated visits. + * - **{@link Piwik\Metrics::INDEX_MAX_ACTIONS}**: The maximum actions perfomred in one visit for this group of + * visits. + * - **{@link Piwik\Metrics::INDEX_SUM_VISIT_LENGTH}**: The total amount of time spent on the site for this + * group of visits. + * - **{@link Piwik\Metrics::INDEX_BOUNCE_COUNT}**: The total number of bounced visits in this group of + * visits. + * - **{@link Piwik\Metrics::INDEX_NB_VISITS_CONVERTED}**: The total number of visits for which at least one + * conversion occurred, for this group of visits. + * * Additional data can be selected by setting the `$additionalSelects` parameter. - * + * * _Note: The metrics returned by this query can be customized by the `$metrics` parameter._ - * + * * @param array|string $dimensions SELECT fields (or just one field) that will be grouped by, * eg, `'referrer_name'` or `array('referrer_name', 'referrer_keyword')`. * The metrics retrieved from the query will be specific to combinations @@ -274,13 +274,13 @@ class LogAggregator * clause. These can be aggregate expressions, eg, `SUM(somecol)`. * @param bool|array $metrics The set of metrics to calculate and return. If false, the query will select * all of them. The following values can be used: - * - [Metrics::INDEX_NB_UNIQ_VISITORS](#) - * - [Metrics::INDEX_NB_VISITS](#) - * - [Metrics::INDEX_NB_ACTIONS](#) - * - [Metrics::INDEX_MAX_ACTIONS](#) - * - [Metrics::INDEX_SUM_VISIT_LENGTH](#) - * - [Metrics::INDEX_BOUNCE_COUNT](#) - * - [Metrics::INDEX_NB_VISITS_CONVERTED](#) + * - {@link Piwik\Metrics::INDEX_NB_UNIQ_VISITORS} + * - {@link Piwik\Metrics::INDEX_NB_VISITS} + * - {@link Piwik\Metrics::INDEX_NB_ACTIONS} + * - {@link Piwik\Metrics::INDEX_MAX_ACTIONS} + * - {@link Piwik\Metrics::INDEX_SUM_VISIT_LENGTH} + * - {@link Piwik\Metrics::INDEX_BOUNCE_COUNT} + * - {@link Piwik\Metrics::INDEX_NB_VISITS_CONVERTED} * @param bool|\Piwik\RankingQuery $rankingQuery * A pre-configured ranking query instance that will be used to limit the result. * If set, the return value is the array returned by {@link Piwik\RankingQuery::execute()}. @@ -465,29 +465,29 @@ class LogAggregator /** * Aggregates ecommerce item data (everything stored in the **log_conversion_item** table) * and returns a DB statement that can be used to iterate over the aggregated data. - * + * * <a name="queryEcommerceItems-result-set"/> * **Result Set** - * + * * The following columns are in each row of the result set: - * - * - **[Metrics::INDEX_ECOMMERCE_ITEM_REVENUE](#)**: The total revenue for the group of items - * this row aggregated. - * - **[Metrics::INDEX_ECOMMERCE_ITEM_QUANTITY](#)**: The total number of items of the group - * this row aggregated. - * - **[Metrics::INDEX_ECOMMERCE_ITEM_PRICE](#)**: The total price for the group of items this - * row aggregated. - * - **[Metrics::INDEX_ECOMMERCE_ORDERS](#)**: The total number of orders this group of items - * belongs to. This will be <= to the total number - * of items in this group. - * - **[Metrics::INDEX_NB_VISITS](#)**: The total number of visits during which each item in - * this group of items was logged. - * - **ecommerceType**: Either [GoalManager::IDGOAL_CART](#) if the items in this group were - * abandoned by a visitor, or [GoalManager::IDGOAL_ORDER](#) if they + * + * - **{@link Piwik\Metrics::INDEX_ECOMMERCE_ITEM_REVENUE}**: The total revenue for the group of items + * this row aggregated. + * - **{@link Piwik\Metrics::INDEX_ECOMMERCE_ITEM_QUANTITY}**: The total number of items of the group + * this row aggregated. + * - **{@link Piwik\Metrics::INDEX_ECOMMERCE_ITEM_PRICE}**: The total price for the group of items this + * row aggregated. + * - **{@link Piwik\Metrics::INDEX_ECOMMERCE_ORDERS}**: The total number of orders this group of items + * belongs to. This will be <= to the total number + * of items in this group. + * - **{@link Piwik\Metrics::INDEX_NB_VISITS}**: The total number of visits during which each item in + * this group of items was logged. + * - **ecommerceType**: Either {@link Piwik\Tracker\GoalManager::IDGOAL_CART} if the items in this group were + * abandoned by a visitor, or {@link Piwik\Tracker\GoalManager::IDGOAL_ORDER} if they * were ordered by a visitor. - * + * * **Limitations** - * + * * Segmentation is not yet supported in this aggregation method. * * @param string $dimension One or more **log_conversion_item** column to group aggregated data by. @@ -526,22 +526,22 @@ class LogAggregator /** * Aggregates action data (everything in the log_action table) and returns a DB * statement that can be used to iterate over the aggregated data. - * + * * <a name="queryActionsByDimension-result-set"/> * **Result Set** - * + * * Each row of the result set represents an aggregated group of actions. The following columns * are in each aggregate row: - * - * - **[Metrics::INDEX_NB_UNIQ_VISITORS](#)**: The total number of unique visitors that performed + * + * - **{@link Piwik\Metrics::INDEX_NB_UNIQ_VISITORS}**: The total number of unique visitors that performed * the actions in this group. - * - **[Metrics::INDEX_NB_VISITS](#)**: The total number of visits these actions belong to. - * - **[Metrics::INDEX_NB_ACTIONS](#)**: The total number of actions in this aggregate group. - * + * - **{@link Piwik\Metrics::INDEX_NB_VISITS}**: The total number of visits these actions belong to. + * - **{@link Piwik\Metrics::INDEX_NB_ACTIONS}**: The total number of actions in this aggregate group. + * * Additional data can be selected through the `$additionalSelects` parameter. - * + * * _Note: The metrics returned by this query can be customized by the `$metrics` parameter._ - * + * * @param array|string $dimensions One or more SELECT fields that will be used to group the log_action * rows by. This parameter determines which log_action rows will be * aggregated together. @@ -551,9 +551,9 @@ class LogAggregator * clause. These can be aggregate expressions, eg, `SUM(somecol)`. * @param bool|array $metrics The set of metrics to calculate and return. If false, the query will select * all of them. The following values can be used: - * - [Metrics::INDEX_NB_UNIQ_VISITORS](#) - * - [Metrics::INDEX_NB_VISITS](#) - * - [Metrics::INDEX_NB_ACTIONS](#) + * - {@link Piwik\Metrics::INDEX_NB_UNIQ_VISITORS} + * - {@link Piwik\Metrics::INDEX_NB_VISITS} + * - {@link Piwik\Metrics::INDEX_NB_ACTIONS} * @param bool|\Piwik\RankingQuery $rankingQuery * A pre-configured ranking query instance that will be used to limit the result. * If set, the return value is the array returned by {@link Piwik\RankingQuery::execute()}. @@ -630,38 +630,38 @@ class LogAggregator /** * Aggregates conversion data (everything in the **log_conversion** table) and returns * a DB statement that can be used to iterate over the aggregated data. - * + * * <a name="queryConversionsByDimension-result-set"/> * **Result Set** - * + * * Each row of the result set represents an aggregated group of conversions. The * following columns are in each aggregate row: - * - * - **[Metrics::INDEX_GOAL_NB_CONVERSIONS](#)**: The total number of conversions in this aggregate - * group. - * - **[Metrics::INDEX_GOAL_NB_VISITS_CONVERTED](#)**: The total number of visits during which these - * conversions were converted. - * - **[Metrics::INDEX_GOAL_REVENUE](#)**: The total revenue generated by these conversions. This value - * includes the revenue from individual ecommerce items. - * - **[Metrics::INDEX_GOAL_ECOMMERCE_REVENUE_SUBTOTAL](#)**: The total cost of all ecommerce items sold - * within these conversions. This value does not - * include tax, shipping or any applied discount. - * _This metric will only be applicable to the special - * **ecommerce** goal (where `idGoal == 'ecommerceOrder'`)._ - * - **[Metrics::INDEX_GOAL_ECOMMERCE_REVENUE_TAX](#)**: The total tax applied to every transaction in these - * conversions. This metric is only applicable to the special - * **ecommerce** goal (where `idGoal == 'ecommerceOrder'`). - * - **[Metrics::INDEX_GOAL_ECOMMERCE_REVENUE_SHIPPING](#)**: The total shipping cost for every transaction - * in these conversions. _This metric is only applicable - * to the special **ecommerce** goal (where - * `idGoal == 'ecommerceOrder'`)._ - * - **[Metrics::INDEX_GOAL_ECOMMERCE_REVENUE_DISCOUNT](#)**: The total discount applied to every transaction - * in these conversions. _This metric is only applicable - * to the special **ecommerce** goal (where - * `idGoal == 'ecommerceOrder'`)._ - * - **[Metrics::INDEX_GOAL_ECOMMERCE_ITEMS](#)**: The total number of ecommerce items sold in each transaction - * in these conversions. _This metric is only applicable to the - * special **ecommerce** goal (where `idGoal =='ecommerceOrder'`). + * + * - **{@link Piwik\Metrics::INDEX_GOAL_NB_CONVERSIONS}**: The total number of conversions in this aggregate + * group. + * - **{@link Piwik\Metrics::INDEX_GOAL_NB_VISITS_CONVERTED}**: The total number of visits during which these + * conversions were converted. + * - **{@link Piwik\Metrics::INDEX_GOAL_REVENUE}**: The total revenue generated by these conversions. This value + * includes the revenue from individual ecommerce items. + * - **{@link Piwik\Metrics::INDEX_GOAL_ECOMMERCE_REVENUE_SUBTOTAL}**: The total cost of all ecommerce items sold + * within these conversions. This value does not + * include tax, shipping or any applied discount. + * _This metric will only be applicable to the special + * **ecommerce** goal (where `idGoal == 'ecommerceOrder'`)._ + * - **{@link Piwik\Metrics::INDEX_GOAL_ECOMMERCE_REVENUE_TAX}**: The total tax applied to every transaction in these + * conversions. This metric is only applicable to the special + * **ecommerce** goal (where `idGoal == 'ecommerceOrder'`). + * - **{@link Piwik\Metrics::INDEX_GOAL_ECOMMERCE_REVENUE_SHIPPING}**: The total shipping cost for every transaction + * in these conversions. _This metric is only applicable + * to the special **ecommerce** goal (where + * `idGoal == 'ecommerceOrder'`)._ + * - **{@link Piwik\Metrics::INDEX_GOAL_ECOMMERCE_REVENUE_DISCOUNT}**: The total discount applied to every transaction + * in these conversions. _This metric is only applicable + * to the special **ecommerce** goal (where + * `idGoal == 'ecommerceOrder'`)._ + * - **{@link Piwik\Metrics::INDEX_GOAL_ECOMMERCE_ITEMS}**: The total number of ecommerce items sold in each transaction + * in these conversions. _This metric is only applicable to the + * special **ecommerce** goal (where `idGoal =='ecommerceOrder'`). * * Additional data can be selected through the `$additionalSelects` parameter. * @@ -700,7 +700,7 @@ class LogAggregator * within each range. * * **Note:** The result of this function is meant for use in the `$additionalSelects` parameter - * in one of the query... methods (for example [queryVisitsByDimension](#queryVisitsByDimension)). + * in one of the query... methods (for example {@link queryVisitsByDimension()}). * * **Example** * @@ -752,7 +752,7 @@ class LogAggregator * visits of returning visitors or not. If this * argument is true, then the SELECT expressions * returned can only be used with the - * [queryVisitsByDimension](#queryVisitsByDimension) method. + * {@link queryVisitsByDimension()} method. * @return array An array of SQL SELECT expressions, for example, * ``` * array( diff --git a/core/DataTable.php b/core/DataTable.php index ce40f78d24..ef1d325504 100644 --- a/core/DataTable.php +++ b/core/DataTable.php @@ -36,7 +36,7 @@ require_once PIWIK_INCLUDE_PATH . '/core/Common.php'; * DataTables consist of rows and each row consists of columns. A column value can be * be numeric, a string or an array. * - * Every row has an ID. The ID is either the index of the row or [ID_SUMMARY_ROW](#ID_SUMMARY_ROW). + * Every row has an ID. The ID is either the index of the row or {@link ID_SUMMARY_ROW}. * * DataTables are hierarchical data structures. Each row can also contain an additional * nested sub-DataTable (commonly referred to as a 'subtable'). @@ -52,11 +52,11 @@ require_once PIWIK_INCLUDE_PATH . '/core/Common.php'; * * Data can be added to DataTables in three different ways. You can either: * - * 1. create rows one by one and add them through [addRow](#addRow) then truncate if desired, + * 1. create rows one by one and add them through {@link addRow()} then truncate if desired, * 2. create an array of DataTable\Row instances or an array of arrays and add them using - * [addRowsFromArray](#addRowsFromArray) or [addRowsFromSimpleArray](#addRowsFromSimpleArray) + * {@link addRowsFromArray()} or {@link addRowsFromSimpleArray()} * then truncate if desired, - * 3. or set the maximum number of allowed rows (with [setMaximumAllowedRows](#setMaximumAllowedRows)) + * 3. or set the maximum number of allowed rows (with {@link setMaximumAllowedRows()}) * and add rows one by one. * * If you want to eventually truncate your data (standard practice for all Piwik plugins), @@ -364,7 +364,7 @@ class DataTable implements DataTableInterface /** * Returns the name of the column this table was sorted by (if any). * - * See [sort](#sort). + * See {@link sort()}. * * @return false|string The sorted column name or false if none. */ @@ -374,7 +374,7 @@ class DataTable implements DataTableInterface } /** - * Enables recursive sorting. If this method is called [sort](#sort) will also sort all + * Enables recursive sorting. If this method is called {@link sort()} will also sort all * subtables. */ public function enableRecursiveSort() @@ -383,7 +383,7 @@ class DataTable implements DataTableInterface } /** - * Enables recursive filtering. If this method is called then the [filter](#filter) method + * Enables recursive filtering. If this method is called then the {@link filter()} method * will apply filters to every subtable in addition to this instance. */ public function enableRecursiveFilters() @@ -394,7 +394,7 @@ class DataTable implements DataTableInterface /** * Applies filter to this datatable. * - * If [enableRecursiveFilters](#enableRecursiveFilters) was called, the filter will be applied + * If {@link enableRecursiveFilters()} was called, the filter will be applied * to all subtables as well. * * @param string|Closure $className Class name, eg. "Sort" or "Sort". If no namespace is supplied, @@ -428,7 +428,7 @@ class DataTable implements DataTableInterface /** * Adds a filter and a list of parameters to the list of queued filters. These filters will be - * executed when [applyQueuedFilters](#applyQueuedFilters) is called. + * executed when {@link applyQueuedFilters()} is called. * * Filters that prettify the output or don't need the full set of rows should be queued. This * way they will be run after the table is truncated which will result in better performance. @@ -445,7 +445,7 @@ class DataTable implements DataTableInterface } /** - * Applies all filters that were previously queued to the table. See [queueFilter](#queueFilter) + * Applies all filters that were previously queued to the table. See {@link queueFilter()} * for more information. */ public function applyQueuedFilters() @@ -466,7 +466,7 @@ class DataTable implements DataTableInterface * * Rows are summed together by summing individual columns. By default columns are summed by * adding one column value to another. Some columns cannot be aggregated this way. In these - * cases, the [COLUMN_AGGREGATION_OPS_METADATA_NAME](#COLUMN_AGGREGATION_OPS_METADATA_NAME) + * cases, the {@link COLUMN_AGGREGATION_OPS_METADATA_NAME} * metadata can be used to specify a different type of operation. * * @param \Piwik\DataTable $tableToSum @@ -572,7 +572,7 @@ class DataTable implements DataTableInterface } /** - * Returns a row by ID. The ID is either the index of the row or [ID_SUMMARY_ROW](#ID_SUMMARY_ROW). + * Returns a row by ID. The ID is either the index of the row or {@link ID_SUMMARY_ROW}. * * @param int $id The row ID. * @return Row|false The Row or false if not found. @@ -610,7 +610,7 @@ class DataTable implements DataTableInterface /** * Adds a row to this table. * - * If [setMaximumAllowedRows](#setMaximumAllowedRows) was called and the current row count is + * If {@link setMaximumAllowedRows()} was called and the current row count is * at the maximum, the new row will be summed to the summary row. If there is no summary row, * this row is set as the summary row. * @@ -1128,10 +1128,10 @@ class DataTable implements DataTableInterface /** * Adds a set of rows from a serialized DataTable string. * - * See [serialize](#serialize). + * See {@link serialize()}. * * @param string $stringSerialized A serialized DataTable string in the format of a string in the - * array returned by [serialize](#serialize). This function will + * array returned by {@link serialize()}. This function will * successfully load DataTables serialized by Piwik 1.X. * @throws Exception if `$stringSerialized` is invalid. */ @@ -1529,7 +1529,7 @@ class DataTable implements DataTableInterface /** * Returns a new DataTable created with data from a 'simple' array. * - * See [addRowsFromSimpleArray](#addRowsFromSimpleArray). + * See {@link addRowsFromSimpleArray()}. * * @param array $array * @return \Piwik\DataTable @@ -1544,7 +1544,7 @@ class DataTable implements DataTableInterface /** * Creates a new DataTable instance from a serialized DataTable string. * - * See [getSerialized](#getSerialized) and [addRowsFromSerializedArray](#addRowsFromSerializedArray) + * See {@link getSerialized()} and {@link addRowsFromSerializedArray()} * for more information on DataTable serialization. * * @param string $data diff --git a/core/DataTable/Filter/AddColumnsProcessedMetrics.php b/core/DataTable/Filter/AddColumnsProcessedMetrics.php index 85653951ce..a141a3732c 100644 --- a/core/DataTable/Filter/AddColumnsProcessedMetrics.php +++ b/core/DataTable/Filter/AddColumnsProcessedMetrics.php @@ -58,7 +58,7 @@ class AddColumnsProcessedMetrics extends Filter } /** - * Adds the processed metrics. See [AddColumnsProcessedMetrics](#AddColumnsProcessedMetrics) for + * Adds the processed metrics. See {@link AddColumnsProcessedMetrics} for * more information. * * @param DataTable $table diff --git a/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php b/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php index 52f77cdd2c..976379d136 100644 --- a/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php +++ b/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php @@ -90,7 +90,7 @@ class AddColumnsProcessedMetricsGoal extends AddColumnsProcessedMetrics } /** - * Adds the processed metrics. See [AddColumnsProcessedMetrics](#AddColumnsProcessedMetrics) for + * Adds the processed metrics. See {@link AddColumnsProcessedMetrics} for * more information. * * @param DataTable $table diff --git a/core/DataTable/Map.php b/core/DataTable/Map.php index a1d98a2206..a0d42795c6 100644 --- a/core/DataTable/Map.php +++ b/core/DataTable/Map.php @@ -55,7 +55,7 @@ class Map implements DataTableInterface } /** - * Set the keyName. See [getKeyName](#getKeyName). + * Set the keyName. See {@link getKeyName()}. * * @param string $name */ diff --git a/core/Date.php b/core/Date.php index 605908c581..88552f51a6 100644 --- a/core/Date.php +++ b/core/Date.php @@ -168,7 +168,7 @@ class Date * Returns a new date object with the same timestamp as `$this` but with a new * timezone. * - * See [getTimestamp](#getTimestamp) to see how the timezone is used. + * See {@link getTimestamp()} to see how the timezone is used. * * @param string $timezone eg, `'UTC'`, `'Europe/London'`, etc. * @return Date @@ -302,7 +302,7 @@ class Date } /** - * See [toString](#toString). + * See {@link toString()}. * * @return string The current date in `'YYYY-MM-DD'` format. */ @@ -383,7 +383,7 @@ class Date } /** - * Returns a date object set to now in UTC (same as [today](#today), except that the time is also set). + * Returns a date object set to now in UTC (same as {@link today()}, except that the time is also set). * * @return \Piwik\Date */ @@ -612,7 +612,7 @@ class Date /** * Adds N number of hours to a UNIX timestamp and returns the result. Using - * this static function instead of [addHour](#addHour) will be faster since a + * this static function instead of {@link addHour()} will be faster since a * Date instance does not have to be created. * * @param int $timestamp The timestamp to add to. diff --git a/core/Db.php b/core/Db.php index a58b03dc7d..f71b64742c 100644 --- a/core/Db.php +++ b/core/Db.php @@ -60,7 +60,7 @@ class Db /** * Create the database object and connects to the database. * - * Shouldn't be called directly, use [get](#get). + * Shouldn't be called directly, use {@link get()}. * * @param array|null $dbInfos Connection parameters in an array. Defaults to the `[database]` * INI config section. diff --git a/core/FrontController.php b/core/FrontController.php index 40a54f420a..3531e9a0a3 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -67,7 +67,7 @@ class FrontController extends Singleton /** * Executes the requested plugin controller action. * - * See also [fetchDispatch](#fetchDispatch). + * See also {@link fetchDispatch()}. * * @throws Exception|\Piwik\PluginDeactivatedException in case the plugin doesn't exist, the action doesn't exist, * there is not enough permission, etc. diff --git a/core/Http.php b/core/Http.php index 13cb5fc6a6..67f67c9c08 100644 --- a/core/Http.php +++ b/core/Http.php @@ -21,7 +21,7 @@ use Exception; class Http { /** - * Returns the "best" available transport method for [sendHttpRequest()](#sendHttpRequest) calls. + * Returns the "best" available transport method for {@link sendHttpRequest()} calls. * * @return string Either `'curl'`, `'fopen'` or `'socket'`. * @api diff --git a/core/IP.php b/core/IP.php index 01210577a2..6e3140fdae 100644 --- a/core/IP.php +++ b/core/IP.php @@ -141,7 +141,7 @@ class IP /** * Convert network address format to presentation format. * - * See also [prettyPreint](#prettyPrint). + * See also {@link prettyPrint()}. * * @param string $ip IP address in network address format. * @return string IP address in presentation format. @@ -154,7 +154,7 @@ class IP } /** - * Alias for [N2P()](#N2P). + * Alias for {@link N2P()}. * * @param string $ip IP address in network address format. * @return string IP address in presentation format. diff --git a/core/Notification.php b/core/Notification.php index 1859aaac4e..208ee11c66 100644 --- a/core/Notification.php +++ b/core/Notification.php @@ -79,7 +79,7 @@ class Notification * If this flag applied, no close icon will be displayed. _Note: persistent notifications always have a close * icon._ * - * See [flags](#flags). + * See {@link $flags}. */ const FLAG_NO_CLEAR = 1; diff --git a/core/Period.php b/core/Period.php index 749d88c114..91a6856c54 100644 --- a/core/Period.php +++ b/core/Period.php @@ -293,7 +293,7 @@ abstract class Period } /** - * See [toString](#toString). + * See {@link toString()}. * * @return string */ diff --git a/core/Plugin.php b/core/Plugin.php index f28bcf327f..00db408d8c 100644 --- a/core/Plugin.php +++ b/core/Plugin.php @@ -202,12 +202,12 @@ class Plugin /** * Uninstalls the plugins. Derived classes should implement this class if the changes - * made in [install](#install) should be undone during uninstallation. + * made in {@link install()} should be undone during uninstallation. * - * In most cases, if you have an [install](#install) method, you should provide - * an [uninstall](#uninstall) method. + * In most cases, if you have an {@link install()} method, you should provide + * an {@link uninstall()} method. * - * @throws Exception if uninstallation of fails for some reason. + * @throws \Exception if uninstallation of fails for some reason. */ public function uninstall() { diff --git a/core/Plugin/Archiver.php b/core/Plugin/Archiver.php index 8c9aa24a28..e87e709383 100644 --- a/core/Plugin/Archiver.php +++ b/core/Plugin/Archiver.php @@ -86,7 +86,7 @@ abstract class Archiver * week than to aggregate each log entry of the week. * * Use {@link Piwik\ArchiveProcessor::aggregateNumericMetrics()} and {@link Piwik\ArchiveProcessor::aggregateDataTableRecords()} - * to aggregate archived reports. Get the {@link Piwik\ArchiveProcessor} instance using the [getProcessor](#getProcessor). + * to aggregate archived reports. Get the {@link Piwik\ArchiveProcessor} instance using the {@link getProcessor()}. */ abstract public function aggregateMultipleReports(); diff --git a/core/Plugin/Controller.php b/core/Plugin/Controller.php index fc06cbb5ea..0eb46d14fa 100644 --- a/core/Plugin/Controller.php +++ b/core/Plugin/Controller.php @@ -251,7 +251,7 @@ abstract class Controller } /** - * Same as [getLastUnitGraph](#getLastUnitGraph), but will set some properties of the ViewDataTable + * Same as {@link getLastUnitGraph()}, but will set some properties of the ViewDataTable * object based on the arguments supplied. * * @param string $currentModuleName The name of the current plugin. @@ -537,7 +537,7 @@ abstract class Controller * **logoSVG** - The SVG logo URL to use. * **hasSVGLogo** - True if there is a SVG logo, false if otherwise. * **enableFrames** - The value of the `[General] enable_framed_pages` INI config option. If - * true, [View::setXFrameOptions](#) is called on the view. + * true, {@link Piwik\View::setXFrameOptions()} is called on the view. * * Also calls {@link setHostValidationVariablesView()}. * diff --git a/core/Plugin/ControllerAdmin.php b/core/Plugin/ControllerAdmin.php index 527aeb6479..ae9ff0d9bb 100644 --- a/core/Plugin/ControllerAdmin.php +++ b/core/Plugin/ControllerAdmin.php @@ -70,7 +70,7 @@ abstract class ControllerAdmin extends Controller * - **topMenu** - The result of `MenuTop::getInstance()->getMenu()`. * - **currentAdminMenuName** - The currently selected admin menu name. * - **enableFrames** - The value of the `[General] enable_framed_pages` INI config option. If - * true, [View::setXFrameOptions](#) is called on the view. + * true, {@link Piwik\View::setXFrameOptions()} is called on the view. * - **isSuperUser** - Whether the current user is a superuser or not. * - **usingOldGeoIPPlugin** - Whether this Piwik install is currently using the old GeoIP * plugin or not. diff --git a/core/Plugin/Settings.php b/core/Plugin/Settings.php index b0fff3c713..8aaca0349d 100644 --- a/core/Plugin/Settings.php +++ b/core/Plugin/Settings.php @@ -19,8 +19,8 @@ use Piwik\Settings\StorageInterface; * Base class of all Settings providers. Plugins that define their own settings can extend * this class to easily make their settings available to Piwik users. * - * Descendants of this class should implement the [init](#init) method and call the - * [addSetting](#addSetting) method for each of the plugin's settings. + * Descendants of this class should implement the {@link init()} method and call the + * {@link addSetting()} method for each of the plugin's settings. * * For an example, see the {@link Piwik\Plugins\ExampleSettingsPlugin\ExampleSettingsPlugin} plugin. * @@ -75,8 +75,8 @@ abstract class Settings implements StorageInterface /** * Implemented by descendants. This method should define plugin settings (via the - * [addSetting](#addSetting)) method and set the introduction text (via the - * [setIntroduction](#setIntroduction)). + * {@link addSetting()}) method and set the introduction text (via the + * {@link setIntroduction()}). */ abstract protected function init(); @@ -186,7 +186,7 @@ abstract class Settings implements StorageInterface } /** - * Sets (overwrites) the value of a setting in memory. To persist the change, [save](#save) must be + * Sets (overwrites) the value of a setting in memory. To persist the change, {@link save()} must be * called afterwards, otherwise the change has no effect. * * Before the setting is changed, the {@link Piwik\Settings\Setting::validate()} and @@ -216,7 +216,7 @@ abstract class Settings implements StorageInterface } /** - * Unsets a setting value in memory. To persist the change, [save](#save) must be + * Unsets a setting value in memory. To persist the change, {@link save()} must be * called afterwards, otherwise the change has no effect. * * @param Setting $setting diff --git a/core/RankingQuery.php b/core/RankingQuery.php index 21d250ab47..375d73b599 100644 --- a/core/RankingQuery.php +++ b/core/RankingQuery.php @@ -92,7 +92,7 @@ class RankingQuery /** * Constructor. * - * @param int|false $limit The result row limit. See [setLimit](#setLimit). + * @param int|false $limit The result row limit. See {@link setLimit()}. */ public function __construct($limit = false) { @@ -160,7 +160,7 @@ class RankingQuery * Sets a column that will be used to filter the result into two categories. * Rows where this column has a value > 0 will be removed from the result and put * into another array. Both the result and the array of excluded rows are returned - * by [execute](#execute). + * by {@link execute()}. * * @param $column string Name of the column. * @throws Exception if method is used more than once. @@ -183,10 +183,11 @@ class RankingQuery * limited resulting in several limited result sets. * * For example, you can run a query aggregating some data on the log_action table and - * partition by log_action.type with the possible values of [TYPE_ACTION_URL](#), - * [TYPE_OUTLINK](#), [TYPE_DOWNLOAD](#). The result will be three separate result sets - * that are aggregated the same ways, but for rows where `log_action.type = TYPE_OUTLINK`, - * for rows where `log_action.type = TYPE_ACTION_URL` and for rows `log_action.type = TYPE_DOWNLOAD`. + * partition by log_action.type with the possible values of {@link Piwik\Tracker\Action::TYPE_PAGE_URL}, + * {@link Piwik\Tracker\Action::TYPE_OUTLINK}, {@link Piwik\Tracker\Action::TYPE_DOWNLOAD}. + * The result will be three separate result sets that are aggregated the same ways, but for rows + * where `log_action.type = TYPE_OUTLINK`, for rows where `log_action.type = TYPE_ACTION_URL` and for + * rows `log_action.type = TYPE_DOWNLOAD`. * * @param $partitionColumn string The column name to partion by. * @param $possibleValues Array of possible column values. diff --git a/core/ScheduledTask.php b/core/ScheduledTask.php index 1bebdfa37e..705e606c76 100644 --- a/core/ScheduledTask.php +++ b/core/ScheduledTask.php @@ -73,7 +73,7 @@ class ScheduledTask * Constructor. * * @param mixed $objectInstance The object or class name for the class that contains the method to - * regularly execute. Usually this will be a [Plugin](#) instance. + * regularly execute. Usually this will be a {@link Plugin} instance. * @param string $methodName The name of the method of `$objectInstance` that will be regularly * executed. * @param mixed|null $methodParameter An optional parameter to pass to the method when executed. @@ -175,7 +175,7 @@ class ScheduledTask /** * Returns the task priority. The priority will be an integer whose value is - * between [ScheduledTask::HIGH_PRIORITY](#) and [ScheduledTask::LOW_PRIORITY](#). + * between {@link HIGH_PRIORITY} and {@link LOW_PRIORITY}. * * @return int */ diff --git a/core/ScheduledTime.php b/core/ScheduledTime.php index b23c5032a4..47aaa968a8 100644 --- a/core/ScheduledTime.php +++ b/core/ScheduledTime.php @@ -18,7 +18,7 @@ use Piwik\ScheduledTime\Monthly; use Piwik\ScheduledTime\Weekly; /** - * Describes the interval on which a scheduled task is executed. Use the [factory](#factory) method + * Describes the interval on which a scheduled task is executed. Use the {@link factory()} method * to create ScheduledTime instances. * * @see \Piwik\ScheduledTask diff --git a/core/Settings/Setting.php b/core/Settings/Setting.php index dc51f6e515..2e0f775f6f 100644 --- a/core/Settings/Setting.php +++ b/core/Settings/Setting.php @@ -58,7 +58,7 @@ abstract class Setting * The setting value will be validated if this field is set. If the value is not one of the * available values, an error will be triggered. * - * _Note: If a custom validator is supplied (see [validate](#validate)), the setting value will + * _Note: If a custom validator is supplied (see {@link validate()}), the setting value will * not be validated._ * * @var null|array @@ -114,7 +114,7 @@ abstract class Setting * A closure that transforms the setting value. If supplied, this closure will be executed after * the setting has been validated. * - * _Note: If a transform is supplied, the setting's [type](#type) has no effect. This means the + * _Note: If a transform is supplied, the setting's {@link type()} has no effect. This means the * transformation function will be responsible for casting the setting value to the appropriate * data type._ * diff --git a/core/Site.php b/core/Site.php index 2458cada4d..fd2b81d7c6 100644 --- a/core/Site.php +++ b/core/Site.php @@ -368,7 +368,7 @@ class Site /** * Clears the site data cache. * - * See also [setSites](#setSites) and [setSitesFromArray](#setSitesFromArray). + * See also {@link setSites()} and {@link setSitesFromArray()}. */ static public function clearCache() { diff --git a/core/View.php b/core/View.php index c92e834617..e027f3bd1f 100644 --- a/core/View.php +++ b/core/View.php @@ -180,7 +180,7 @@ class View implements ViewInterface /** * Renders the current view. Also sends the stored 'Content-Type' HTML header. - * See [setContentType](#setContentType). + * See {@link setContentType()}. * * @return string Generated template. */ diff --git a/core/ViewDataTable/Config.php b/core/ViewDataTable/Config.php index 612e10f82b..493d67eab0 100644 --- a/core/ViewDataTable/Config.php +++ b/core/ViewDataTable/Config.php @@ -36,10 +36,10 @@ use Piwik\Plugins\API\API; * it, extend this class and add your properties as fields. * * Properties are marked as client side properties by calling the - * [addPropertiesThatShouldBeAvailableClientSide](#addPropertiesThatShouldBeAvailableClientSide) method. + * {@link addPropertiesThatShouldBeAvailableClientSide()} method. * * Properties are marked as overridable by calling the - * [addPropertiesThatCanBeOverwrittenByQueryParams](#addPropertiesThatCanBeOverwrittenByQueryParams) method. + * {@link addPropertiesThatCanBeOverwrittenByQueryParams()} method. * * ### Example * @@ -534,7 +534,7 @@ class Config } /** - * Adds a related report to the [related_reports](#related_reports) property. If the report + * Adds a related report to the {@link $related_reports} property. If the report * references the one that is currently being displayed, it will not be added to the related * report list. * @@ -558,12 +558,12 @@ class Config } /** - * Adds several related reports to the [related_reports](#related_reports) property. If + * Adds several related reports to the {@link $related_reports} property. If * any of the reports references the report that is currently being displayed, it will not * be added to the list. All other reports will still be added though. * * If you need to make sure the related report URL has some extra query parameters, - * use [addRelatedReport](#addRelatedReport). + * use {@link addRelatedReport()}. * * @param array $relatedReports Array mapping report IDs with their internationalized display * titles, eg, @@ -584,7 +584,7 @@ class Config /** * Associates internationalized text with a metric. Overwrites existing mappings. * - * See [translations](#translations). + * See {@link $translations}. * * @param string $columnName The name of a column in the report data, eg, `'nb_visits'` or * `'goal_1_nb_conversions'`. @@ -598,7 +598,7 @@ class Config /** * Associates multiple translations with metrics. * - * See [translations](#translations) and [addTranslation](#addTranslation). + * See {@link $translations} and {@link addTranslation()}. * * @param array $translations An array of column name => text mappings, eg, * ``` |