protected function renderTitle($title, $cellPadding, $columnsWidths) {
		$columnsNumber = count($columnsWidths);
		$tableWidth    = array_sum($columnsWidths) + $columnsNumber + ($columnsNumber * $cellPadding * 2) - 1;
		
		$content = '+' . str_repeat('-', $tableWidth) . '+' . PHP_EOL;
		
		$content .= '|';
		$content .= str_repeat(' ', $cellPadding);
		$content .= $title;
		$content .= str_repeat(' ', $tableWidth - $this->strlen($title) - $cellPadding);
		$content .= '|';
		
		return $content;
	}
protected function renderTitle($title, $cellPadding, $columnsWidths) {
		$columnsNumber = count($columnsWidths);
		$tableWidth    = array_sum($columnsWidths) + $columnsNumber + ($columnsNumber * $cellPadding * 2) - 1;
		
		$content = '+' . str_repeat('-', $tableWidth) . '+' . PHP_EOL;
		
		$content .= '|';
		$content .= str_repeat(' ', $cellPadding);
		$content .= $title;
		$content .= str_repeat(' ', $tableWidth - $this->strlen($title) - $cellPadding);
		$content .= '|';
		
		return $content;
	}
protected function renderTitle ( $ title , $ cellPadding , $ columnsWidths ) { $ columnsNumber = count ( $ columnsWidths ) ; $ tableWidth = array_sum ( $ columnsWidths ) + $ columnsNumber + ( $ columnsNumber * $ cellPadding * 2 ) - 1 ; $ content = '+' . str_repeat ( '-' , $ tableWidth ) . '+' . PHP_EOL ; $ content .= '|' ; $ content .= str_repeat ( ' ' , $ cellPadding ) ; $ content .= $ title ; $ content .= str_repeat ( ' ' , $ tableWidth - $ this -> strlen ( $ title ) - $ cellPadding ) ; $ content .= '|' ; return $ content ; }
Render the table's title

@param  string $title
@param  int    $cellPadding
@param  array  $columnsWidths
@return string
Render the table s title