コード例 #1
0
ファイル: Json.php プロジェクト: bossrabbit/piwik
 private function convertDataTableToArray($table)
 {
     $renderer = new Php();
     $renderer->setTable($table);
     $renderer->setRenderSubTables($this->isRenderSubtables());
     $renderer->setSerialize(false);
     $renderer->setHideIdSubDatableFromResponse($this->hideIdSubDatatable);
     $array = $renderer->flatRender();
     return $array;
 }
コード例 #2
0
ファイル: Xml.php プロジェクト: brienomatty/elmsln
 /**
  * Converts the given data table to an array
  *
  * @param DataTable|DataTable/Map $table  data table to convert
  * @return array
  */
 protected function getArrayFromDataTable($table)
 {
     if (is_array($table)) {
         return $table;
     }
     $renderer = new Php();
     $renderer->setRenderSubTables($this->isRenderSubtables());
     $renderer->setSerialize(false);
     $renderer->setTable($table);
     $renderer->setHideIdSubDatableFromResponse($this->hideIdSubDatatable);
     return $renderer->flatRender();
 }
コード例 #3
0
 private function assertTableRowsEquals($expectedRows, $table)
 {
     $renderer = new DataTable\Renderer\Php();
     $renderer->setSerialize(false);
     $actualRows = $renderer->render($table);
     $this->assertEquals($expectedRows, $actualRows);
 }