addColumn($content); } else { $this->column(12, $content); } } } /** * Add a column. * * @param int $width * @param $content */ public function column($width, $content) { $column = new Column($content, $width); $this->addColumn($column); } /** * @param Column $column */ protected function addColumn(Column $column) { $this->columns[] = $column; } /** * Build row column. * * @return string */ public function render() { $html = $this->startRow(); foreach ($this->columns as $column) { $html .= $column->render(); } return $html.$this->endRow(); } /** * Start row. * * @return string */ protected function startRow() { return '
'; } /** * End column. * * @return string */ protected function endRow() { return '
'; } }