-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Labels
Description
Hey there,
what do you think of centering column contents, or aligning (numbers) to the right?
As far as I can see, there is a buildCell method that calls another pad method and also already knows the column width. Roughly outline as use example:
<?php
$climate->table($data, [
// STR_PAD_RIGHT or null is default anyway
// 'name' => STR_PAD_RIGHT,
'age' => STR_PAD_LEFT,
'centered' => STR_PAD_BOTH
]);And inside the Table class, I imagine:
protected function buildCell($key, $column)
{
$align = $this->column_aligns[$key];
$width = $this->column_widths[$key];
return $this->pad($column, $width, $align);
}Regards
MCStreetguy