Exemplo n.º 1
0
 /**
  * Rename a column in all rows
  *
  * @param string  $oldName  Old column name
  * @param string  $newName  New column name
  */
 public function renameColumn($oldName, $newName)
 {
     foreach ($this->getRows() as $row) {
         $row->renameColumn($oldName, $newName);
         if (($idSubDataTable = $row->getIdSubDataTable()) !== null) {
             Piwik_DataTable_Manager::getInstance()->getTable($idSubDataTable)->renameColumn($oldName, $newName);
         }
     }
     if (!is_null($this->summaryRow)) {
         $this->summaryRow->renameColumn($oldName, $newName);
     }
 }