diff options
Diffstat (limited to 'core/DataTable/Map.php')
-rw-r--r-- | core/DataTable/Map.php | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/core/DataTable/Map.php b/core/DataTable/Map.php index a0d42795c6..0f9ef069b8 100644 --- a/core/DataTable/Map.php +++ b/core/DataTable/Map.php @@ -14,13 +14,13 @@ use Piwik\DataTable; use Piwik\DataTable\Renderer\Console; /** - * Stores an array of DataTables indexed by one type of DataTable metadata (such as site ID + * Stores an array of {@link DataTable}s indexed by one type of {@link DataTable} metadata (such as site ID * or period). * * DataTable Maps are returned on all queries that involve multiple sites and/or multiple - * periods. The Maps will contain a DataTable for each site and period combination. + * periods. The Maps will contain a {@link DataTable} for each site and period combination. * - * The Map implements some of the features of the DataTable such as queueFilter and getRowsCount. + * The Map implements some {@link DataTable} such as {@link queueFilter()} and {@link getRowsCount}. * * @package Piwik * @subpackage DataTable @@ -55,7 +55,7 @@ class Map implements DataTableInterface } /** - * Set the keyName. See {@link getKeyName()}. + * Set the name of they metadata used to index {@link DataTable}s. See {@link getKeyName()}. * * @param string $name */ @@ -65,7 +65,7 @@ class Map implements DataTableInterface } /** - * Returns the number of DataTables in this DataTable\Map. + * Returns the number of {@link DataTable}s in this DataTable\Map. * * @return int */ @@ -75,7 +75,7 @@ class Map implements DataTableInterface } /** - * Queue a filter to DataTable child of contained by this instance. + * Queue a filter to {@link DataTable} child of contained by this instance. * * See {@link Piwik\DataTable::queueFilter()} for more information.. * @@ -134,7 +134,7 @@ class Map implements DataTableInterface } /** - * Returns the first DataTable in the DataTable array. + * Returns the first element in the Map's array. * * @return DataTable|Map|false */ @@ -144,7 +144,7 @@ class Map implements DataTableInterface } /** - * Returns the last DataTable in the DataTable array. + * Returns the last element in the Map's array. * * @return DataTable|Map|false */ @@ -154,9 +154,9 @@ class Map implements DataTableInterface } /** - * Adds a new DataTable to the DataTable\Map. + * Adds a new {@link DataTable} or Map instance to this DataTable\Map. * - * @param DataTable $table + * @param DataTable|Map $table * @param string $label Label used to index this table in the array. */ public function addTable($table, $label) @@ -165,7 +165,7 @@ class Map implements DataTableInterface } /** - * Returns a string output of this DataTable\Map (applying the default renderer to every DataTable + * Returns a string output of this DataTable\Map (applying the default renderer to every {@link DataTable} * of this DataTable\Map). * * @return string @@ -178,7 +178,7 @@ class Map implements DataTableInterface } /** - * @see DataTable::enableRecursiveSort() + * See {@link DataTable::enableRecursiveSort()}. */ public function enableRecursiveSort() { @@ -188,9 +188,10 @@ class Map implements DataTableInterface } /** - * Renames the given column in each contained DataTable. + * Renames the given column in each contained {@link DataTable}. * - * @see DataTable::renameColumn + * See {@link DataTable::renameColumn()}. + * * @param string $oldName * @param string $newName */ @@ -202,9 +203,10 @@ class Map implements DataTableInterface } /** - * Deletes the specified columns in each contained DataTable. + * Deletes the specified columns in each contained {@link DataTable}. * - * @see DataTable::deleteColumns + * See {@link DataTable::deleteColumns()}. + * * @param array $columns The columns to delete. * @param bool $deleteRecursiveInSubtables This param is currently not used. */ @@ -218,7 +220,7 @@ class Map implements DataTableInterface /** * Deletes a table from the array of DataTables. * - * @param string $id The label associated with DataTable. + * @param string $id The label associated with {@link DataTable}. */ public function deleteRow($id) { @@ -226,7 +228,7 @@ class Map implements DataTableInterface } /** - * Deletes the given column in every contained DataTable. + * Deletes the given column in every contained {@link DataTable}. * * @see DataTable::deleteColumn * @param string $name @@ -239,7 +241,7 @@ class Map implements DataTableInterface } /** - * Returns the array containing all row values in all data tables for the requested column. + * Returns the array containing all column values in all contained {@link DataTable}s for the requested column. * * @param string $name The column name. * @return array @@ -257,9 +259,9 @@ class Map implements DataTableInterface } /** - * Merges the rows of every child DataTable into a new DataTable and + * Merges the rows of every child {@link DataTable} into a new one and * returns it. This function will also set the label of the merged rows - * to the label of the DataTable they were originally from. + * to the label of the {@link DataTable} they were originally from. * * The result of this function is determined by the type of DataTable * this instance holds. If this DataTable\Map instance holds an array @@ -295,7 +297,7 @@ class Map implements DataTableInterface * Inner Label 1: * DataTable(row2[label = 'Outer Label 0'], row4[label = 'Outer Label 1']) * - * In addition, if this instance holds an array of DataTable\Maps, the + * If this instance holds an array of DataTable\Maps, the * metadata of the first child is used as the metadata of the result. * * This function can be used, for example, to smoosh IndexedBySite archive @@ -359,8 +361,9 @@ class Map implements DataTableInterface } /** - * Adds a DataTable to all the tables in this array. - * NOTE: Will only add `$tableToSum` if the childTable has some rows + * Sums a DataTable to all the tables in this array. + * + * _Note: Will only add `$tableToSum` if the childTable has some rows._ * * See {@link Piwik\DataTable::addDataTable()}. * @@ -377,7 +380,7 @@ class Map implements DataTableInterface * Returns a new DataTable\Map w/ child tables that have had their * subtables merged. * - * @see DataTable::mergeSubtables + * See {@link DataTable::mergeSubtables()}. * * @return Map */ @@ -422,7 +425,7 @@ class Map implements DataTableInterface } /** - * @see DataTable::getColumns() + * See {@link DataTable::getColumns()}. * * @return array */ |