Exemple #1
0
 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;
 }
Exemple #2
0
 /**
  * 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();
 }
Exemple #3
0
 public function testPHPMapIsMadeOfMapTest3()
 {
     $dataTable = $this->_getDataTableMap_containsDataTableMap_simpleOneRow();
     $render = new Php();
     $render->setTable($dataTable);
     $rendered = $render->render();
     $expected = serialize(array('idSite' => array('row1' => 14.0, 'row2' => 15.0, 'row3' => array())));
     $this->assertEquals($expected, $rendered);
 }