public function getScalarRepresentationOf(TableElement $table)
 {
     /* @var $table \lukaszmakuch\TableRenderer\Container */
     return ["type" => $this->typeAsText, "value" => array_map(function (TableElement $e) {
         return $this->actualRenderer->getScalarRepresentationOf($e);
     }, $table->getElements())];
 }
 public function getScalarRepresentationOf(TableElement $table)
 {
     /* @var $table TextValue */
     return ["type" => "text", "value" => $table->getText()];
 }
 /**
  * @param TableElement $treeTableModel
  * 
  * @return FlatGrid
  */
 private function buildGridBasedOn(TableElement $treeTableModel)
 {
     //get builders based on prototypes
     $sizeAwareTreeBuilder = clone $this->sizeAwareTreeBuilderPrototype;
     $flatGridBuilder = clone $this->flatGridBuilderPrototype;
     //build size aware tree
     $treeTableModel->accept($sizeAwareTreeBuilder);
     $sizeAwareTree = $sizeAwareTreeBuilder->getBuiltSizeAwareTree();
     //build and return flat grid
     $sizeAwareTree->accept($flatGridBuilder);
     return $flatGridBuilder->getBuiltGrid();
 }
 /**
  * @param TableElement $tableElement
  * @return Element
  */
 private function getSizeAwareTreeOf(TableElement $tableElement)
 {
     $builder = clone $this;
     $tableElement->accept($builder);
     return $builder->getBuiltSizeAwareTree(false);
 }