diff --git a/src/console/PhutilConsoleTable.php b/src/console/PhutilConsoleTable.php --- a/src/console/PhutilConsoleTable.php +++ b/src/console/PhutilConsoleTable.php @@ -19,7 +19,7 @@ * 'email' => 'joe@bloggs.com', * )) * - * ->setDrawBorders(true) + * ->setBorders(true) * ->draw(); */ final class PhutilConsoleTable extends Phobject { @@ -29,6 +29,7 @@ private $widths = array(); private $borders = false; private $padding = 1; + private $showHeader = true; private $console; const ALIGN_LEFT = 'left'; @@ -60,6 +61,12 @@ public function setPadding($padding) { $this->padding = $padding; + return $this; + } + + public function setShowHeader($show_header) { + $this->showHeader = $show_header; + return $this; } @@ -111,6 +118,10 @@ $output .= $this->formatSeparator('='); } + if (!$this->showHeader) { + return $output; + } + $columns = array(); foreach ($this->columns as $key => $column) { $columns[] = PhutilConsoleFormatter::formatString(