예제 #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();
 }
 private function assertTableRowsEquals($expectedRows, $table)
 {
     $renderer = new DataTable\Renderer\Php();
     $renderer->setSerialize(false);
     $actualRows = $renderer->render($table);
     $this->assertEquals($expectedRows, $actualRows);
 }