/** * Converts the current data table to an array * * @return array * @throws Exception */ public function originalRender() { Piwik::checkObjectTypeIs($this->table, array('Simple', 'DataTable')); if ($this->table instanceof Simple) { $array = $this->renderSimpleTable($this->table); } elseif ($this->table instanceof DataTable) { $array = $this->renderTable($this->table); } if ($this->serialize) { $array = serialize($array); } return $array; }
/** * Checks that the API returned a normal DataTable (as opposed to DataTable\Map) * @throws \Exception * @return void */ protected function checkStandardDataTable() { Piwik::checkObjectTypeIs($this->dataTable, array('\\Piwik\\DataTable')); }